Unsigned.

This commit is contained in:
Marc Burns 2012-11-20 20:04:33 -05:00
parent 352dfbda3a
commit c29ab07f0d
1 changed files with 2 additions and 2 deletions

View File

@ -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;