I want to import cipher from org.springframework dependency. I have imported it like below,
import org.springframework.security.crypto.keygen.KeyGenerators;
import org.springframework.security.crypto.encrypt.CipherUtils.Cipher;
import org.springframework.security.crypto.encrypt.SecretKey;
but there's an error throwing saying that,
Error:(25,63) java: package org.springframework.security.crypto.encrypt.CipherUtils does not exist
Then I tried
import org.springframework.security.crypto.keygen.KeyGenerators;
import org.springframework.security.crypto.encrypt.Cipher;
import org.springframework.security.crypto.encrypt.SecretKey;
I still get the below error,
Error:(25,51) java: cannot find symbol
I want cipher to use encryption and decryption of my otp and expiry date. How can I import cipher from org.springframework
Class
org.springframework.security.crypto.encrypt.CipherUtilsdoesn't contain inner classCipherand packageorg.springframework.security.crypto.encryptdoesn't contain classCiphertoo.Class
org.springframework.security.crypto.encrypt.CipherUtilsuse thejavax.crypto.Cipherclass and You must use this class too.