0
需要Java中的此代碼的幫助。我需要Objective-C中的一些等價物。任何幫助?Objective-C中的Java AES256加密
THX
public static final String getAES256(final String text){
try{
SecretKeySpec specKey = new SecretKeySpec(Hex.decode(MERCHANT_KEY), "AES");
Cipher aesCipher = Cipher.getInstance("AES/ECB/ZeroBytePadding");
aesCipher.init(Cipher.ENCRYPT_MODE, specKey);
byte[] result = aesCipher.doFinal(Hex.decode(text));
return convToHex(result);
}catch(Exception e){
e.printStackTrace();
}
return null;
}