Encrypts or decrypts a string. This utilizes IEncryption
More...
Encrypts or decrypts a string. This utilizes IEncryption
◆ Decrypt()
Decrypts the given string
- Parameters
-
str | The string to decrypt |
encryption | The instance of the IEncryption interface |
Note that decryption failures may throw an exception, or just return null value
- Returns
- A response object containing the decrypted value, and if the encrypted value is "current" - eg. if there is a new method/key
◆ Encrypt()
static string Sphyrnidae.Common.Encryption.EncryptionExtensions.Encrypt |
( |
this string |
str, |
|
|
IEncryption |
encryption |
|
) |
| |
|
static |
Encrypts the given string
- Parameters
-
str | The string to encrypt |
encryption | The instance of the IEncryption interface |
Note that encryption failures may throw an exception, or just return null
- Returns
- The encrypted string
◆ EqualsHash()
static bool Sphyrnidae.Common.Encryption.EncryptionExtensions.EqualsHash |
( |
this string |
str, |
|
|
IEncryption |
encryption, |
|
|
string |
salt, |
|
|
byte[] |
hash |
|
) |
| |
|
static |
Hashes a string and then compares it to what is already known (eg. Does password match?)
- Parameters
-
str | The string to 1-way encrypt |
encryption | The instance of the IEncryption interface |
salt | A non-private/secure string used in the encryption process |
hash | The existing bytes to be compared to |
- Returns
- True if the match, false otherwise
◆ Hash()
static byte [] Sphyrnidae.Common.Encryption.EncryptionExtensions.Hash |
( |
this string |
str, |
|
|
IEncryption |
encryption, |
|
|
string |
salt |
|
) |
| |
|
static |
Performs hashing (1-way encryption) against the string using the given salt
- Parameters
-
str | The string to 1-way encrypt |
encryption | The instance of the IEncryption interface |
salt | A non-private/secure string used in the encryption process |
- Returns
- The hashed bytes (currently 128 bytes long)
The documentation for this class was generated from the following file:
- C:/Users/dougb/Desktop/Sphyrnidae/New/Common/Common/Encryption/EncryptionExtensions.cs