Hi, please 

In the T-SQL code below: Which way is better suited to generate a Salt 
string - the 'hand-rolled' version or concatenating 2 GUIDs (assuming that 
a salt length of 72 is desired)?

-- Method 1: 'hand-rolling'
 SET @Salt = ''
 WHILE LEN(@Salt) < 72
 BEGIN
      SET @Salt = @Salt + CHAR(CONVERT(INT, Floor(RAND() * (126.0 - 33 + 1) 
+ 33)))
  END

    -- Method 2: concatenating 2 GUIDs
    SET @Salt = CONVERT(VARCHAR(36), NEWID()) + CONVERT(VARCHAR(36), 
NEWID())

Thanks for all input!

-- 
You received this message because you are subscribed to "Crypto++ Users". More 
information about Crypto++ and this group is available at 
http://www.cryptopp.com and 
http://groups.google.com/forum/#!forum/cryptopp-users.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cryptopp-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/cryptopp-users/ff43fc40-0688-427d-bdbd-7d0927fdc338n%40googlegroups.com.

Reply via email to