C# Class Nethereum.KeyStore.Crypto.KeyStoreCrypto

Datei anzeigen Open project: Nethereum/Nethereum

Public Methods

Method Description
CalculateKeccakHash ( byte value ) : byte[]
Decrypt ( byte mac, byte iv, byte cipherText, byte derivedKey ) : byte[]
DecryptPbkdf2Sha256 ( string password, byte mac, byte iv, byte cipherText, int c, byte salt, int dklen ) : byte[]
DecryptScrypt ( string password, byte mac, byte iv, byte cipherText, int n, int p, int r, byte salt, int dklen ) : byte[]
GenerateAesCtrCipher ( byte iv, byte encryptKey, byte input ) : byte[]
GenerateCipherKey ( byte derivedKey ) : byte[]
GenerateDerivedScryptKey ( byte password, byte salt, int n, int r, int p, int dkLen ) : byte[]
GenerateMac ( byte derivedKey, byte cipherText ) : byte[]
GeneratePbkdf2Sha256DerivedKey ( byte password, byte salt, int count, int dklen ) : byte[]
GetPasswordAsBytes ( string password ) : byte[]

Private Methods

Method Description
ValidateMac ( byte mac, byte cipherText, byte derivedKey ) : void

Method Details

CalculateKeccakHash() public method

public CalculateKeccakHash ( byte value ) : byte[]
value byte
return byte[]

Decrypt() public method

public Decrypt ( byte mac, byte iv, byte cipherText, byte derivedKey ) : byte[]
mac byte
iv byte
cipherText byte
derivedKey byte
return byte[]

DecryptPbkdf2Sha256() public method

public DecryptPbkdf2Sha256 ( string password, byte mac, byte iv, byte cipherText, int c, byte salt, int dklen ) : byte[]
password string
mac byte
iv byte
cipherText byte
c int
salt byte
dklen int
return byte[]

DecryptScrypt() public method

public DecryptScrypt ( string password, byte mac, byte iv, byte cipherText, int n, int p, int r, byte salt, int dklen ) : byte[]
password string
mac byte
iv byte
cipherText byte
n int
p int
r int
salt byte
dklen int
return byte[]

GenerateAesCtrCipher() public method

public GenerateAesCtrCipher ( byte iv, byte encryptKey, byte input ) : byte[]
iv byte
encryptKey byte
input byte
return byte[]

GenerateCipherKey() public method

public GenerateCipherKey ( byte derivedKey ) : byte[]
derivedKey byte
return byte[]

GenerateDerivedScryptKey() public method

public GenerateDerivedScryptKey ( byte password, byte salt, int n, int r, int p, int dkLen ) : byte[]
password byte
salt byte
n int
r int
p int
dkLen int
return byte[]

GenerateMac() public method

public GenerateMac ( byte derivedKey, byte cipherText ) : byte[]
derivedKey byte
cipherText byte
return byte[]

GeneratePbkdf2Sha256DerivedKey() public method

public GeneratePbkdf2Sha256DerivedKey ( byte password, byte salt, int count, int dklen ) : byte[]
password byte
salt byte
count int
dklen int
return byte[]

GetPasswordAsBytes() public method

public GetPasswordAsBytes ( string password ) : byte[]
password string
return byte[]