[英]org.springframework doesn't contain CIpher
I want to import cipher from org.springframework dependency.我想从 org.springframework 依赖项导入密码。 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.我希望密码使用我的 otp 和到期日期的加密和解密。 How can I import cipher from org.springframework
如何从 org.springframework 导入密码
Class org.springframework.security.crypto.encrypt.CipherUtils
doesn't contain inner class Cipher
and package org.springframework.security.crypto.encrypt
doesn't contain class Cipher
too. Class
org.springframework.security.crypto.encrypt.CipherUtils
doesn't contain inner class Cipher
and package org.springframework.security.crypto.encrypt
doesn't contain class Cipher
too.
Class org.springframework.security.crypto.encrypt.CipherUtils
use the javax.crypto.Cipher
class and You must use this class too. Class
org.springframework.security.crypto.encrypt.CipherUtils
使用javax.crypto.Cipher
class 并且您也必须使用此 class。
Error:(25,63) java: package org.springframework.security.crypto.encrypt.CipherUtils does not exist
错误:(25,63) java: package org.springframework.security.crypto.encrypt.CipherUtils 不存在
You receive this error because CipherUtils is a class.您收到此错误是因为 CipherUtils 是 class。
Use import org.springframework.security.crypto.encrypt.CipherUtils;
使用
import org.springframework.security.crypto.encrypt.CipherUtils;
if you want to use this class.如果你想使用这个 class。
Error:(25,51) java: cannot find symbol
错误:(25,51)java:找不到符号
You receive this error because you Cipher doesn't exist here您收到此错误是因为您的密码在此处不存在
import org.springframework.security.crypto.encrypt.Cipher;
. .
Use import javax.crypto.Cipher;
使用
import javax.crypto.Cipher;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.