Sphyrnidae Common Library  2.0.1
Shared Utilities/Library
Sphyrnidae.Common.Encryption.IEncryption Interface Reference

Encryption of a string More...

Inheritance diagram for Sphyrnidae.Common.Encryption.IEncryption:
Sphyrnidae.Common.Encryption.Algorithms.EncryptionAlgorithm Sphyrnidae.Common.Encryption.EncryptionDispatcher Sphyrnidae.Common.Encryption.Algorithms.EncryptionNormal Sphyrnidae.Common.Encryption.Algorithms.EncryptionOld Sphyrnidae.Common.Encryption.Algorithms.EncryptionStrong Sphyrnidae.Common.Encryption.Algorithms.EncryptionWeak Sphyrnidae.Common.Encryption.EncryptionNone

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...
 

Detailed Description

Encryption of a string

Member Function Documentation

◆ Decrypt()

DecryptionResponse Sphyrnidae.Common.Encryption.IEncryption.Decrypt ( string  str)

Decrypts the given string

Parameters
strThe string to decrypt

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

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.

◆ Encrypt()

string Sphyrnidae.Common.Encryption.IEncryption.Encrypt ( string  str)

◆ Hash()

byte [] Sphyrnidae.Common.Encryption.IEncryption.Hash ( string  str,
string  salt 
)

◆ HashMatch()

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)

Parameters
strThe string to hash
saltThe hashing salt
hashThe hash to compare
Returns
True if the hashed string matches

Implemented in Sphyrnidae.Common.Encryption.EncryptionDispatcher, and Sphyrnidae.Common.Encryption.Algorithms.EncryptionAlgorithm.


The documentation for this interface was generated from the following file: