I hope i chose the right subforum.
I have a problem with an encryption made in AdobeFlex and which I need to translate to VB.NET.
The core is a AES Encryption, but I tried several ways and code and the encrypted strings weren't the same
The original Flex Sourcecode is:
My question is how to get the code work in VB.NET
thanks for your help in advance.
I have a problem with an encryption made in AdobeFlex and which I need to translate to VB.NET.
The core is a AES Encryption, but I tried several ways and code and the encrypted strings weren't the same
The original Flex Sourcecode is:
PHP:
private function encryptAES(arg1:String, arg2:String, arg3:String="aes128-cfb8", arg4:String="None"):String
{
var loc1:*=com.hurlant.util.Hex.toArray(com.hurlant.util.Hex.fromString(arg2));
var loc2:*=com.hurlant.util.Hex.toArray(com.hurlant.util.Hex.fromString(arg1));
var loc3:*=arg4 != "pkcs5" ? new com.hurlant.crypto.symmetric.NullPad() : new com.hurlant.crypto.symmetric.PKCS5();
var loc4:*=com.hurlant.crypto.Crypto.getCipher("simple-" + arg3, loc1, loc3);
loc3.setBlockSize(loc4.getBlockSize());
loc4.encrypt(loc2);
return com.hurlant.util.Base64.encodeByteArray(loc2);
}
My question is how to get the code work in VB.NET
thanks for your help in advance.