Crypter.Crypt Method

CryptSharp

CrypterCrypt Method CryptSharp
Overload List

  Name Description
Public method Crypt(Byte)
Creates a one-way password hash (crypted password) from password bytes.
Public method Crypt(String)
Creates a one-way password hash (crypted password) from a password string.
Public method Crypt(Byte, CrypterOptions)
Creates a one-way password hash (crypted password) from password bytes. Options modify the crypt operation.
Public method Crypt(Byte, String)
Creates a one-way password hash (crypted password) from password bytes and a salt string. The salt can be produced using GenerateSalt(CrypterOptions). Because crypted passwords take the form algorithm+salt+hash, if you pass a crypted password as the salt parameter, the same algorithm and salt will be used to re-crypt the password. Since randomness comes from the salt, the same salt means the same hash, and so the same crypted password will result. Therefore, this method can both generate *and* verify crypted passwords.
Public method Crypt(String, CrypterOptions)
Creates a one-way password hash (crypted password) from a password string. Options modify the crypt operation.
Public method Crypt(String, String)
Creates a one-way password hash (crypted password) from a password string and a salt string. The salt can be produced using GenerateSalt(CrypterOptions). Because crypted passwords take the form algorithm+salt+hash, if you pass a crypted password as the salt parameter, the same algorithm and salt will be used to re-crypt the password. Since randomness comes from the salt, the same salt means the same hash, and so the same crypted password will result. Therefore, this method can both generate *and* verify crypted passwords.
Top
See Also

Reference