I am using this algorithm to encrypt from JavaScript using the CryptoJS library, the algorithm I need to implement is AES of type “CTR No Padding“:
var key = CryptoJS.enc.Hex.parse('F29BA22B55F9B229CC9C250E11FD4384');
var iv = CryptoJS.enc.Hex.parse('C160C947CD9FC273');
function encrypt(plainText) {
return CryptoJS.AES.encrypt(
plainText,
key, {
iv: iv,
padding: CryptoJS.pad.NoPadding,
mode: CryptoJS.mode.CTR
}
);
}
Now I need the function to decrypt this on the server with the Java language and also the function to decrypt, does anyone know the algorithms?