Overview
Contains Functions that expose functionality provided by the Java Cryptography Architecture (JCA):
Note: The JCA framework uses different "providers" to implement specific cryptographic algorithms. Provider implementations need to be installed prior to use.
See https://docs.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html for more details.
Hi,I'm trying to encrypt a password using "AES/ECB/PKCS5Padding" but failed so far.
For example the password is "Test" followed by a timestamp and SALT is "%aaa*+11/r5Testj8"
I would expect something like this:Plain text is: 'Test19.09.2019 10:45:12' Encrypted text is 'S/WAvRLGqQ0HO25DpRYAzoO5ML3ZYbo0UT65lS80yr0='
My approach is:passwordencrypt( cleartext: "Test19.09.2019 09:01:25", password: "Test", salt: keyencrypt(cleartext: "%aaa*+00/r5Test9", key: text2hex("%aaa*+00/r5Test9"), transformation: "AES"), iterationCount: 1000, transformation : "AES/ECB/PKCS5PADDING")
Error: java.security.NoSuchAlgorithmException: AES/ECB/PKCS5PADDING SecretKeyFactory not available
Any help? ThanksYusuf
Ok another problem keyencrypt the key argument has to be a AES generated key. Java's SecretKeyFactory can generate this and it looks like that's what it's trying to do for passwordencrypt but unfortunately this plugin does not expose that method. I suggest using another transformation or modifying the plugin. You will discover as we did the plugin doesn't work well and the developer doesn't respond.
ok, maybe we should really develop our own plugin...thank you for your advise