Cosmos.Security is an inline project of Cosmosloops labs..
From NuGet:
Install-Package Cosmos.Security.Encryption
- MD2
- MD4
- MD5
- SHA1/256/384/512
- SM3
- HMAC
- MurmurHash2
- MurmurHash3
- Time33/DBJ33A
- AES
- DES/TripleDES
- RC4
- RCX/ThreeRCX
- RCY/ThreeRCY
- SM4
- TEA/XTEA/XXTEA
- DSA
- RSA
- SM2 (partially implement)
HAMC-SHA1:
var signature = HMACSHA1HashingProvider.Signature("image", "alexinea");
DES without salt:
var s = DESEncryptionProvider.Encrypt("image", "alexinea", "forerunner");
Assert.Equal("fJ2yrnAPaH0=", s);
var o = DESEncryptionProvider.Decrypt(s, "alexinea", "forerunner");
Assert.Equal("image", o);
DES with salt:
var s = DESEncryptionProvider.Encrypt("image", "alexinea", "forerunner", "123412341234");
Assert.Equal("s4h5u8hA/2Y=", s);
var o = DESEncryptionProvider.Decrypt(s, "alexinea", "forerunner", "123412341234");
Assert.Equal("image", o);
DES with salt and autokey
var key = DESEncryptionProvider.CreateKey();
var s = DESEncryptionProvider.Encrypt("image", key.Key, key.IV, "123412341234");
var o = DESEncryptionProvider.Decrypt(s, key.Key, key.IV, "123412341234");
Assert.Equal("image", o);
People or projects that have made a great contribbution to this project:
- Oren Novotny
- Stulzq
- The next one must be you
- Anarh2404/AdlerSimd
- murmurhash-net
- odinmillion/MurmurHash.Net
- Portable.BouncyCastle
- Secure-Hash-Algorithms
- ToolGood.RCX
- xxtea/xxtea-dotnet
Member project of Cosmosloops labs..