NickReferee Posted August 12, 2021 Share Posted August 12, 2021 Chapter 7 page 240. The salt nacl is saved like VARBINARY(64) but its dimension is always 64 byte thereby could be better BINARY(64). Furthermore nacl=UNHEX(SHA2(RAND(),512) uses RAND() that has low entropy, you could use RANDOM_BYTES(len) with len>16 namely nacl=UNHEX(SHA2(RANDOM_BYTES(20),512) Furthermore I didn't undestand one thing: RAND() return a FLOAT and SHA2() function need as first parameter a String thus how does it work? Is there in MySQL an automatic conversion from float to String? Best regards Nick Link to comment Share on other sites More sharing options...
Larry Posted August 13, 2021 Share Posted August 13, 2021 Yes, that would be my assumption: that it's doing a conversion. If it wasn't, then the SHA2() function would return an error for an improper argument. Link to comment Share on other sites More sharing options...
Recommended Posts