Created
December 16, 2013 15:06
-
-
Save kawakawa/7988497 to your computer and use it in GitHub Desktop.
AES復号
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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