public static byte[] Decrypt( byte[] data, byte[] keyIV )
{
var rm = new RijndaelManaged {Padding = PaddingMode.PKCS7};
ICryptoTransform decryptor = rm.CreateDecryptor( keyIV, keyIV );
using( var msDecrypt = new MemoryStream( ) )
{
using( var decStream = new CryptoStream( msDecrypt, decryptor,
CryptoStreamMode.Write ) )
{
decStream.Write( data, 0, data.Length );
decStream.FlushFinalBlock( );
return msDecrypt.ToArray( );
}
}
}
What would be the equivalent GO crypto code to (given a slice of bytes from
an encrypted file and the IV slice of bytes) that would decrypt the file?
I'm assuming here it would be the crypto/aes package, but not sure how to
set the padding mode, etc.
Thanks!
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.