Skip to content

Instantly share code, notes, and snippets.

@kawakawa
Created December 16, 2013 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kawakawa/7988497 to your computer and use it in GitHub Desktop.
Save kawakawa/7988497 to your computer and use it in GitHub Desktop.
AES復号
using (SymmetricAlgorithm cspAlgorithm = new AesManaged())
{
cspAlgorithm.Key = keyBytes
cspAlgorithm.IV = ivBytes
using (ICryptoTransform encryptor = cspAlgorithm.CreateDecryptor())
{
byte[] source = Convert.FromBase64String(Base64変換された暗号化された文章);
byte[] decrypted = encryptor.TransformFinalBlock(source, 0, source.Length);
復号された文章= Encoding.UTF8.GetString(decrypted);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment