You are not logged in.
Pages: 1
I has looking at SynCripto to see if it implements DES algorithm.
I need to find a vcl code to encrypt strings that is compatible is this c# source code:
public static string encrypt(string value, string key)
{
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
des.Mode = CipherMode.CBC;
des.Padding = PaddingMode.PKCS7;
des.Key = ASCIIEncoding.ASCII.GetBytes(key);
des.IV = ASCIIEncoding.ASCII.GetBytes(key);
ICryptoTransform encryptor = des.CreateEncryptor();
byte[] messageBytes = System.Text.ASCIIEncoding.ASCII.GetBytes(value);
byte[] encryptedBytes = encryptor.TransformFinalBlock(messageBytes, 0, messageBytes.Length);
return Convert.ToBase64String(encryptedBytes);
}
Example:
calling with encrypt(“1234568â€, "c9FC57w3");
I should have bVRN+cnpPLvpJkRE+W5+JQ==
Thank you
Pages: 1