Encrypt / Decrypt strings with given Key and IV for .NET.
- .NET 10 (
net10.0)
- Encrypt / Decrypt string data with Key and IV.
- AES-CTR mode with URL-safe Base64 output.
- Built-in random password generator.
- Prefix helper for generated passwords.
using EncrypterLibrary;
var key = Security.GeneratePassword(true, true, true, true, 32);
var iv = Security.GeneratePassword(true, true, true, true, 16);
var encrypted = "Hello my dear !".EncryptMyData(key!, iv!);
var decrypted = encrypted?.DecryptMyData(key!, iv!);- Key length must be exactly
32. - IV length must be exactly
16. - Invalid inputs return
null.