Method | Description | |
---|---|---|
GetHash ( string filepath ) : string |
This vesion reads the whole file in at once. This is not great since it can consume a lot of memory if the file is large. However a buffered approach generates diferrent hashes across different platforms.
|
|
GetRSAProvider ( string xmlKey ) : |
||
GetRandomByteString ( int byteLength ) : string |
Gets an "X2" string representation of a random number.
|
|
GetRandomInt ( |
||
GetRandomInt ( ) : int |
Returns a 10 digit random number.
|
|
GetRandomInt ( int length ) : int |
Returns a random number of a specified length.
|
|
GetRandomString ( ) : string | ||
GetRandomString ( int length ) : string | ||
GetRandomUInt ( ) : |
||
GetRandomUInt16 ( ) : |
||
GetSHAHash ( ) : byte[] | ||
GetSHAHashAsHex ( ) : string |
Returns the hash with each byte as an X2 string. This is useful for situations where the hash needs to only contain safe ASCII characters.
|
|
GetSHAHashAsString ( ) : string | ||
RSADecrypt ( string xmlKey, string cypherText ) : string | ||
RSADecryptRaw ( string xmlKey, byte cypher ) : byte[] | ||
RSAEncrypt ( string xmlKey, string plainText ) : string | ||
RSAEncryptRaw ( string xmlKey, string plainText ) : byte[] | ||
SymmetricDecrypt ( string key, string iv, byte cipherBytes ) : string | ||
SymmetricDecrypt ( string key, string iv, string cipherText ) : string | ||
SymmetricEncrypt ( string key, string iv, byte plainTextBytes ) : string | ||
SymmetricEncrypt ( string key, string iv, string plainText ) : string | ||
createRandomSalt ( int length ) : byte[] |
Method | Description | |
---|---|---|
GetFileStream ( string filepath ) : |
Used by methods wishing to perform a hash operation on a file. This method will perform a number of checks and if happy return a read only file stream.
|
|
GetFixedLengthByteArray ( string value, int length ) : byte[] |
public static GetHash ( string filepath ) : string | ||
filepath | string | |
return | string |
public static GetRSAProvider ( string xmlKey ) : |
||
xmlKey | string | |
return |
public static GetRandomByteString ( int byteLength ) : string | ||
byteLength | int | The byte length of the random number string to obtain. |
return | string |
public static GetRandomInt ( |
||
minValue | ||
maxValue | ||
return |
public static GetRandomInt ( int length ) : int | ||
length | int | |
return | int |
public static GetRandomString ( int length ) : string | ||
length | int | |
return | string |
public static GetRandomUInt16 ( ) : |
||
return |
public static GetSHAHashAsString ( ) : string | ||
return | string |
public static RSADecrypt ( string xmlKey, string cypherText ) : string | ||
xmlKey | string | |
cypherText | string | |
return | string |
public static RSADecryptRaw ( string xmlKey, byte cypher ) : byte[] | ||
xmlKey | string | |
cypher | byte | |
return | byte[] |
public static RSAEncrypt ( string xmlKey, string plainText ) : string | ||
xmlKey | string | |
plainText | string | |
return | string |
public static RSAEncryptRaw ( string xmlKey, string plainText ) : byte[] | ||
xmlKey | string | |
plainText | string | |
return | byte[] |
public static SymmetricDecrypt ( string key, string iv, byte cipherBytes ) : string | ||
key | string | |
iv | string | |
cipherBytes | byte | |
return | string |
public static SymmetricDecrypt ( string key, string iv, string cipherText ) : string | ||
key | string | |
iv | string | |
cipherText | string | |
return | string |
public static SymmetricEncrypt ( string key, string iv, byte plainTextBytes ) : string | ||
key | string | |
iv | string | |
plainTextBytes | byte | |
return | string |
public static SymmetricEncrypt ( string key, string iv, string plainText ) : string | ||
key | string | |
iv | string | |
plainText | string | |
return | string |
public static createRandomSalt ( int length ) : byte[] | ||
length | int | |
return | byte[] |