C# Class Deveel.Data.Security.CryptoHashExtenions

显示文件 Open project: deveel/deveeldb

Public Methods

Method Description
ComputeString ( this hash, string s ) : string
GenerateSalt ( this hash ) : byte[]
GenerateSaltString ( this hash ) : string
MakePbkdf2 ( this hash, byte data, byte salt, int length ) : byte[]
MakePbkdf2 ( this hash, byte data, byte salt, int length, int iterationCount ) : byte[]
MakePbkdf2 ( this hash, byte salt, int length, int iterationCount ) : byte[]
MakePbkdf2String ( this hash, string input, byte salt, int length ) : string
MakePbkdf2String ( this hash, string input, byte salt, int length, int iterationCount ) : string
MakePbkdf2String ( this hash, string input, string salt, int length ) : string
MakePbkdf2String ( this hash, string input, string salt, int length, int iterationCount ) : string
VerifyPbkdf2 ( this hash, byte hashed, byte otherData, byte salt ) : bool
VerifyPbkdf2 ( this hash, byte hashed, byte otherData, byte salt, int iterationCount ) : bool
VerifyPbkdf2String ( this hash, string hashedString, string otherString, byte salt ) : bool
VerifyPbkdf2String ( this hash, string hashedString, string otherString, byte salt, int iterationCount ) : bool
VerifyPbkdf2String ( this hash, string hashedString, string otherString, string saltString ) : bool
VerifyPbkdf2String ( this hash, string hashedString, string otherString, string saltString, int iterationCount ) : bool

Private Methods

Method Description
BinaryToHex ( byte data ) : string
ByteArraysEqual ( byte a, byte b ) : bool

Method Details

ComputeString() public static method

public static ComputeString ( this hash, string s ) : string
hash this
s string
return string

GenerateSalt() public static method

public static GenerateSalt ( this hash ) : byte[]
hash this
return byte[]

GenerateSaltString() public static method

public static GenerateSaltString ( this hash ) : string
hash this
return string

MakePbkdf2() public static method

public static MakePbkdf2 ( this hash, byte data, byte salt, int length ) : byte[]
hash this
data byte
salt byte
length int
return byte[]

MakePbkdf2() public static method

public static MakePbkdf2 ( this hash, byte data, byte salt, int length, int iterationCount ) : byte[]
hash this
data byte
salt byte
length int
iterationCount int
return byte[]

MakePbkdf2() public static method

public static MakePbkdf2 ( this hash, byte salt, int length, int iterationCount ) : byte[]
hash this
salt byte
length int
iterationCount int
return byte[]

MakePbkdf2String() public static method

public static MakePbkdf2String ( this hash, string input, byte salt, int length ) : string
hash this
input string
salt byte
length int
return string

MakePbkdf2String() public static method

public static MakePbkdf2String ( this hash, string input, byte salt, int length, int iterationCount ) : string
hash this
input string
salt byte
length int
iterationCount int
return string

MakePbkdf2String() public static method

public static MakePbkdf2String ( this hash, string input, string salt, int length ) : string
hash this
input string
salt string
length int
return string

MakePbkdf2String() public static method

public static MakePbkdf2String ( this hash, string input, string salt, int length, int iterationCount ) : string
hash this
input string
salt string
length int
iterationCount int
return string

VerifyPbkdf2() public static method

public static VerifyPbkdf2 ( this hash, byte hashed, byte otherData, byte salt ) : bool
hash this
hashed byte
otherData byte
salt byte
return bool

VerifyPbkdf2() public static method

public static VerifyPbkdf2 ( this hash, byte hashed, byte otherData, byte salt, int iterationCount ) : bool
hash this
hashed byte
otherData byte
salt byte
iterationCount int
return bool

VerifyPbkdf2String() public static method

public static VerifyPbkdf2String ( this hash, string hashedString, string otherString, byte salt ) : bool
hash this
hashedString string
otherString string
salt byte
return bool

VerifyPbkdf2String() public static method

public static VerifyPbkdf2String ( this hash, string hashedString, string otherString, byte salt, int iterationCount ) : bool
hash this
hashedString string
otherString string
salt byte
iterationCount int
return bool

VerifyPbkdf2String() public static method

public static VerifyPbkdf2String ( this hash, string hashedString, string otherString, string saltString ) : bool
hash this
hashedString string
otherString string
saltString string
return bool

VerifyPbkdf2String() public static method

public static VerifyPbkdf2String ( this hash, string hashedString, string otherString, string saltString, int iterationCount ) : bool
hash this
hashedString string
otherString string
saltString string
iterationCount int
return bool