mirror of
https://github.com/QuasarApp/qca.git
synced 2025-05-08 08:49:34 +00:00
randomInt should return signed int
svn path=/trunk/kdesupport/qca/; revision=648706
This commit is contained in:
parent
888844476e
commit
0f17fbc864
2
TODO
2
TODO
@ -13,7 +13,6 @@
|
|||||||
make sure there aren't any cases where a Foo::supportsBar()-style function
|
make sure there aren't any cases where a Foo::supportsBar()-style function
|
||||||
reports true, but then when the object is created, it doesn't actually
|
reports true, but then when the object is created, it doesn't actually
|
||||||
support the feature (because the wrong provider was used).
|
support the feature (because the wrong provider was used).
|
||||||
why is Random returning unsigned?
|
|
||||||
code:
|
code:
|
||||||
strange backtrace on mac (ask textshell)
|
strange backtrace on mac (ask textshell)
|
||||||
other:
|
other:
|
||||||
@ -30,6 +29,7 @@
|
|||||||
tls extensions: hostname and ocsp stapling
|
tls extensions: hostname and ocsp stapling
|
||||||
QSecureArray/QBigInteger -> QCA::SecureArray/QCA::BigInteger ?
|
QSecureArray/QBigInteger -> QCA::SecureArray/QCA::BigInteger ?
|
||||||
code:
|
code:
|
||||||
|
global random thread-safety?
|
||||||
tls/sasl
|
tls/sasl
|
||||||
fix asker implementation, it is a disaster
|
fix asker implementation, it is a disaster
|
||||||
dirwatch: thread safety
|
dirwatch: thread safety
|
||||||
|
@ -104,7 +104,7 @@ namespace QCA
|
|||||||
* myRandomInt = QCA::Random::randomInt();
|
* myRandomInt = QCA::Random::randomInt();
|
||||||
* \endcode
|
* \endcode
|
||||||
*/
|
*/
|
||||||
static uint randomInt();
|
static int randomInt();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide a specified number of random bytes
|
* Provide a specified number of random bytes
|
||||||
|
@ -48,10 +48,10 @@ uchar Random::randomChar()
|
|||||||
return globalRNG().nextByte();
|
return globalRNG().nextByte();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint Random::randomInt()
|
int Random::randomInt()
|
||||||
{
|
{
|
||||||
QSecureArray a = globalRNG().nextBytes(sizeof(int));
|
QSecureArray a = globalRNG().nextBytes(sizeof(int));
|
||||||
uint x;
|
int x;
|
||||||
memcpy(&x, a.data(), a.size());
|
memcpy(&x, a.data(), a.size());
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user