RE: AES mode in use
Hi,
I’m still playing around with the build-in crypto library from Suitescript and I was wondering if anyone knows which is AES mode in place for the following snippet code:
const cipher: crypto.Cipher = crypto.createCipher({ algorithm: crypto.EncryptionAlg.AES, key: secretKey, padding: crypto.Padding.PKCS5Padding });
It’s well-known that the built-in library is a bit limited, so I cannot specify which is AES mode in place, but I cannot even know which one is in use (e.g., CBC, GCM) , and each of those has a different algorithm logic, namely:
- AES_CBC_HMAC_SHA2: A128CBC-HS256, A192CBC-HS384, A256CBC-HS512
- AES GCM: A128GCM, A192GCM, A256GCM.
Unfortunately, I was not able to figure out what is going under the hood and my recipient needs to know beforehand which is the mode that should be used and its encryption algorithm.
Does anyone know what the mode in use for Suitescript?
PS: You may have stumbled upon a similar question here, I’m aware that using the crypto -js library will be more efficient and easy, but this is my last try before uploading a new library as we have some internal requirements.
Hi,
It references CBC in here:
Thanks,
Chris