Closed LoganDark closed 2 years ago
Currently, you have to guess how big of a buffer you should allocate for an encoded hash. If it's not big enough you just get an error. In practice it should be safe to allocate hashlen * 2 bytes or so, but it would be nice to know in advance.
hashlen * 2
Oh, it looks like there is one here:
https://github.com/P-H-C/phc-winner-argon2/blob/96ddae8937462d84cc95c642090b7910d3707dc7/include/argon2.h#L419-L431
whoops lol!
Currently, you have to guess how big of a buffer you should allocate for an encoded hash. If it's not big enough you just get an error. In practice it should be safe to allocate
hashlen * 2
bytes or so, but it would be nice to know in advance.