Jump to content
Larry Ullman's Book Forums

Possible Errata , or improvement. + a question


Recommended Posts

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

 Share

×
×
  • Create New...