![]() |
Sphyrnidae Common Library
2.0.1
Shared Utilities/Library
|
Encryption of a string More...
Public Member Functions | |
byte[] | Hash (string str, string salt) |
Performs hashing (1-way encryption) against the string using the given salt More... | |
bool | HashMatch (string str, string salt, byte[] hash) |
Determines if the hashed string is the same as what was provided (eg. passwords match) More... | |
string | Encrypt (string str) |
Encrypts the given string More... | |
DecryptionResponse | Decrypt (string str) |
Decrypts the given string More... | |
Encryption of a string
DecryptionResponse Sphyrnidae.Common.Encryption.IEncryption.Decrypt | ( | string | str | ) |
Decrypts the given string
str | The string to decrypt |
Note that decryption failures may throw an exception, or just return null value
Implemented in Sphyrnidae.Common.Encryption.EncryptionNone, Sphyrnidae.Common.Encryption.EncryptionDispatcher, Sphyrnidae.Common.Encryption.Algorithms.EncryptionWeak, Sphyrnidae.Common.Encryption.Algorithms.EncryptionStrong, Sphyrnidae.Common.Encryption.Algorithms.EncryptionOld, Sphyrnidae.Common.Encryption.Algorithms.EncryptionNormal, and Sphyrnidae.Common.Encryption.Algorithms.EncryptionAlgorithm.
string Sphyrnidae.Common.Encryption.IEncryption.Encrypt | ( | string | str | ) |
Encrypts the given string
str | The string to encrypt |
Note that encryption failures may throw an exception, or just return null
Implemented in Sphyrnidae.Common.Encryption.EncryptionNone, Sphyrnidae.Common.Encryption.EncryptionDispatcher, Sphyrnidae.Common.Encryption.Algorithms.EncryptionWeak, Sphyrnidae.Common.Encryption.Algorithms.EncryptionStrong, Sphyrnidae.Common.Encryption.Algorithms.EncryptionOld, Sphyrnidae.Common.Encryption.Algorithms.EncryptionNormal, and Sphyrnidae.Common.Encryption.Algorithms.EncryptionAlgorithm.
byte [] Sphyrnidae.Common.Encryption.IEncryption.Hash | ( | string | str, |
string | salt | ||
) |
Performs hashing (1-way encryption) against the string using the given salt
str | The string to 1-way encrypt |
salt | A non-private/secure string used in the encryption process |
Implemented in Sphyrnidae.Common.Encryption.EncryptionNone, Sphyrnidae.Common.Encryption.EncryptionDispatcher, Sphyrnidae.Common.Encryption.Algorithms.EncryptionWeak, Sphyrnidae.Common.Encryption.Algorithms.EncryptionStrong, Sphyrnidae.Common.Encryption.Algorithms.EncryptionOld, Sphyrnidae.Common.Encryption.Algorithms.EncryptionNormal, and Sphyrnidae.Common.Encryption.Algorithms.EncryptionAlgorithm.
bool Sphyrnidae.Common.Encryption.IEncryption.HashMatch | ( | string | str, |
string | salt, | ||
byte[] | hash | ||
) |
Determines if the hashed string is the same as what was provided (eg. passwords match)
str | The string to hash |
salt | The hashing salt |
hash | The hash to compare |
Implemented in Sphyrnidae.Common.Encryption.EncryptionDispatcher, and Sphyrnidae.Common.Encryption.Algorithms.EncryptionAlgorithm.