Skip to content

Latest commit

 

History

History
61 lines (52 loc) · 1.3 KB

README.md

File metadata and controls

61 lines (52 loc) · 1.3 KB

LCrypto

Cryptography library include:

  • Symmetric encryption algorithms: BlowFish
  • Cryptographic hash functions: SHA-1, SHA-224, SHA-256, SHA-384, SHA-512

Usage

BlowFish

Case 1:

string value = "a";
ICryptor cryptor = CryptorBuilder.WithKey("FFFFFFFFFF").CreateCryptor(ECryptAlgorithm.BlowFish);
var encrypt = cryptor.Encrypt(value);       
var decrypt = cryptor.Decrypt(encrypt);

Case 2:

string value = "a";
ICryptor cryptor = CryptorBuilder.Blowfish;      
var encrypt = cryptor.Encrypt(value);      
var decrypt = cryptor.Decrypt(encrypt);

SHA1

IHashing hash = HashBuilder.SHA1;
hash.Hashing("a");

SHA224

IHashing hash = HashBuilder.SHA224;
hash.Hashing("a");

SHA256

IHashing hash = HashBuilder.SHA256;
hash.Hashing("a");

SHA384

IHashing hash = HashBuilder.SHA384;
hash.Hashing("a");

SHA512

IHashing hash = HashBuilder.SHA512;
hash.Hashing("a");

Links to libraries

BlowFish.cs

SHA1.dll

SHA224.dll

SHA256.dll

SHA384.dll

SHA512.dll