.NET RijndaelManaged to Chilkat Equivalent

Here’s a snippet of C# code to do AES encryption.  What is the equivalent in Chilkat? Dim cspRijndael As New System.Security.Cryptography.RijndaelManaged csCryptoStream = New CryptoStream(fsOutput, cspRijndael.CreateEncryptor(bytKey, bytIV), CryptoStreamMode.Write) “Rijndael” is the name of the encryption algorithm, and (essentially) “AES” is Rijndael limited to the choices of 128, 192, or 256 bits. Rijndael/AES is a symmetric block encryption algorithm, and the […]

PHP AES/Rijndael Encryption Confusion

AES is not exactly synonymous with “Rijndael”. AES is a (restricted) variant of Rijndael. AES has a fixed block size of 128 bits and a key size of 128, 192, or 256 bits, whereas Rijndael is specified with block and key sizes in any multiple of 32 bits, both with a minimum of 128 and a maximum of 256 bits. […]

Getting Started with AES Decryption

This is a common question: You receive encrypted data and a key and want to decrypt. The person providing the encrypted data has provided little information, perhaps only that the encryption algorithm is AES. Where to do you begin, and what additional information, if any, do you need? Answer: AES encryption comes in 3 key sizes: 128-bit, 192-bit, and 256-bit. […]

Matching MySQL’s AES_ENCRYPT Functions

The following example programs demonstrate how to match MySQL’s AES_ENCRYPT function in different programming languages: ASP: Match MySQL AES_ENCRYPT Function SQL Server: Match MySQL AES_ENCRYPT Function C#: Match MySQL AES_ENCRYPT Function C++: Match MySQL AES_ENCRYPT Function MFC: Match MySQL AES_ENCRYPT Function C: Match MySQL AES_ENCRYPT Function Delphi: Match MySQL AES_ENCRYPT Function Visual FoxPro: Match MySQL AES_ENCRYPT Function Java: Match MySQL […]

C# Encrypting/Decrypting with Stream

This C# example demonstrates how to use Chilkat.Crypt2 to encrypt and decrypting using the .NET FileStream class: Chilkat.Crypt2 crypt = new Chilkat.Crypt2(); bool success = crypt.UnlockComponent("Anything for 30-day trial"); if (!success) { MessageBox.Show(crypt.LastErrorText); return; } crypt.CryptAlgorithm = "aes"; crypt.CipherMode = "cbc"; crypt.KeyLength = 128; crypt.SetEncodedIV("0000000000000000", "hex"); crypt.SetEncodedKey("abcdefghijklmnop", "ascii"); // Open input and output files as file streams… FileStream fsIn = […]