Sc00bz/bscrypt

reference hashes and plaintext

Opened this issue · 1 comments

Please provide some reference hashes and plaintext for password-storage use.

Do you have a suggested '$$'-style hash format, such as

$bscrypt$[workfactors]$[salt]$[hash]

?

bscrypt/bscrypt.cpp

Lines 624 to 638 in 1354e2a

// Encode
// $bscrypt$m=#,t=#,p=#$salt..................hash............................
size_t offset = 11;
memcpy(hash, "$bscrypt$m=", 11);
offset += writeUint32(hash + offset, memoryKiB);
memcpy(hash + offset, ",t=", 3);
offset += 3;
offset += writeUint32(hash + offset, iterations);
memcpy(hash + offset, ",p=", 3);
offset += 3;
offset += writeUint32(hash + offset, parallelism);
hash[offset++] = '$';
offset += base64Encode(hash + offset, salt, 16 * sizeof(uint8_t), BASE64_ENCODE_FLAG_NO_PAD);
offset += base64Encode(hash + offset, hashBytes, hashBytesSize, BASE64_ENCODE_FLAG_NO_PAD);
hash[offset] = 0;