ShaCrypter.Crypt Method (Byte[], String)

CryptSharp

ShaCrypterCrypt Method (Byte, String) CryptSharp
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.

Namespace: CryptSharp
Assembly: CryptSharp (in CryptSharp.dll) Version: 2.1.0.0
Syntax

public override string Crypt(
	byte[] password,
	string salt
)
Public Overrides Function Crypt ( 
	password As Byte(),
	salt As String
) As String
public:
virtual String^ Crypt(
	array<unsigned char>^ password, 
	String^ salt
) override
abstract Crypt : 
        password : byte[] * 
        salt : string -> string 
override Crypt : 
        password : byte[] * 
        salt : string -> string 

Parameters

password
Type: SystemByte
The bytes of the password.
salt
Type: SystemString
The salt string or crypted password containing a salt string.

Return Value

Type: String
The crypted password.
See Also

Reference