# AES-256 with key decryption function Boo Lang public static def decrypt(ciphertext as (byte), key as string) as (byte): using aesAlg = Aes.Create(): salt = array(byte,[0x12,0x35,0x56,0x78,0x90,0xAB,0xAD,0xEF,0xDD,0x31]) rfc = Rfc2898DeriveBytes(key,salt) aesAlg.Padding = PaddingMode.PKCS7 aesAlg.KeySize = 256 aesAlg.Key = rfc.GetBytes(32) aesAlg.IV = rfc.GetBytes(16) decryptor = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.IV) using decryptedData = MemoryStream(): using cryptoStream = CryptoStream(decryptedData, decryptor, CryptoStreamMode.Write): cryptoStream.Write(ciphertext, 0, ciphertext.Length) cryptoStream.FlushFinalBlock() return decryptedData.ToArray()