Hi,

I have the following Java function encrypting data on a server.

public static String encrypt(String message) {
        String key = "some key";


MessageDigest md5 = MessageDigest.getInstance("MD5");

byte[] encrypt = message.getBytes();
        SecretKeySpec
secretKey = new SecretKeySpec(md5.digest(key.getBytes()), "AES");
        Cipher cipher = Cipher.getInstance("AES");

cipher.init(Cipher.ENCRYPT_MODE, secretKey);
        byte[]
cipherText = cipher.doFinal(encrypt);
        Base64 encoder = new
Base64();
        return new String(encoder.encode(cipherText));

}

How would I code the decryption using Crypto C++?


Thanks

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to