Unsigned.
This commit is contained in:
parent
352dfbda3a
commit
c29ab07f0d
|
@ -13,7 +13,7 @@ SaltStore::SaltStore(uint64_t key_lifetime, size_t salt_size, std::string secret
|
|||
|
||||
std::string SaltStore::getSalt() {
|
||||
expireKeys();
|
||||
char bfr[salt_size];
|
||||
unsigned char bfr[salt_size];
|
||||
FILE * rand_in = fopen("/dev/urandom", "r");
|
||||
if(!rand_in) {
|
||||
fprintf(stderr, "Could not open /dev/urandom!\n");
|
||||
|
@ -32,7 +32,7 @@ std::string SaltStore::getSalt() {
|
|||
}
|
||||
bfr[salt_size-1] = 0;
|
||||
|
||||
std::string salt(bfr);
|
||||
std::string salt((char*)bfr);
|
||||
|
||||
valid_keys.push_back(std::pair<uint64_t, SHA1Hash>((uint64_t)time(NULL), SHA1Hash(salt + secret)));
|
||||
return salt;
|
||||
|
|
Loading…
Reference in New Issue