本文整理汇总了Java中org.jasypt.encryption.pbe.PBEStringEncryptor类的典型用法代码示例。如果您正苦于以下问题:Java PBEStringEncryptor类的具体用法?Java PBEStringEncryptor怎么用?Java PBEStringEncryptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PBEStringEncryptor类属于org.jasypt.encryption.pbe包,在下文中一共展示了PBEStringEncryptor类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newEncryptor
import org.jasypt.encryption.pbe.PBEStringEncryptor; //导入依赖的package包/类
/**
* AES algorithm
* @param passphrase
* @return
*/
private PBEStringEncryptor newEncryptor(String passphrase) {
StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
encryptor.setPassword(passphrase);
encryptor.setProvider(PROVIDER);
encryptor.setAlgorithm(CRYPTO_ALGO);
return encryptor;
}
示例2: stringEncryptor
import org.jasypt.encryption.pbe.PBEStringEncryptor; //导入依赖的package包/类
@Bean
PBEStringEncryptor stringEncryptor(String encryptionKey) {
StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
encryptor.setAlgorithm("PBEWithMD5AndDES");
encryptor.setKeyObtentionIterations(1000);
encryptor.setPassword(encryptionKey);
HibernatePBEEncryptorRegistry.getInstance().registerPBEStringEncryptor("basicStringEncryptor", encryptor);
return encryptor;
}
示例3: setTextEncryptor
import org.jasypt.encryption.pbe.PBEStringEncryptor; //导入依赖的package包/类
public void setTextEncryptor(PBEStringEncryptor textEncryptor) {
this.textEncryptor = textEncryptor;
}
示例4: newEncryptor
import org.jasypt.encryption.pbe.PBEStringEncryptor; //导入依赖的package包/类
/**
* DES algorithm
* @param passphrase
* @return
*/
private PBEStringEncryptor newEncryptor(String passphrase) {
StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
encryptor.setPassword(passphrase);
return encryptor;
}
示例5: setEncryptors
import org.jasypt.encryption.pbe.PBEStringEncryptor; //导入依赖的package包/类
/**
* Registers the given {@link PBEStringEncryptor PBEStringEncryptors} by name.
*
* @param encryptors a map of names and encryptors.
*/
public synchronized void setEncryptors( Map<String, PBEStringEncryptor> encryptors )
{
INSTANCE.encryptors.putAll( encryptors );
}
示例6: getEncryptor
import org.jasypt.encryption.pbe.PBEStringEncryptor; //导入依赖的package包/类
/**
* Get encryptor from registry by name.
*
* @param name the name of the encryptor.
* @return an instance of {@link PBEStringEncryptor} or null.
*/
public PBEStringEncryptor getEncryptor( String name )
{
return INSTANCE.encryptors.get( name );
}