public static byte[] ReadBytesEncrypted(byte[] encrypted, string password) { byte[] decrypted = AESThenHMAC.SimpleDecryptWithPassword(encrypted, password, Constants.NotSecretPayload.Length); return(decrypted); }
public static byte[] WriteBytesEncrypted(byte[] data, string password) { byte[] encrypted = AESThenHMAC.SimpleEncryptWithPassword(data, password, Constants.NotSecretPayload); return(encrypted); }