randomSalt

Generates a random salt. Necessary for salting passwords.

NEVER REUSE A SALT! This must be called separately EVERY time any user sets or resets a password. Reusing salts defeats the security of salting passwords.

The length must be a multiple of 4, or this will throw an Exception

More...
  1. Salt randomSalt(size_t length = defaultSaltLength)
  2. Salt randomSalt(ref Rand rand, size_t length = defaultSaltLength)
    Salt
    randomSalt
    (
    Rand = DefaultCryptoRand
    )
    (
    ref Rand rand
    ,
    )
    if (
    isDAuthRandom!Rand
    )

Detailed Description

Optional Params

Rand - Default value is 'DefaultCryptoRand'

length - Default value is 'defaultSaltLength'

Meta