Example usage for org.springframework.security.crypto.encrypt Encryptors queryableText

List of usage examples for org.springframework.security.crypto.encrypt Encryptors queryableText

Introduction

In this page you can find the example usage for org.springframework.security.crypto.encrypt Encryptors queryableText.

Prototype

public static TextEncryptor queryableText(CharSequence password, CharSequence salt) 

Source Link

Document

Creates an encryptor for queryable text strings that uses standard password-based encryption.

Usage

From source file:org.unidle.config.SocialConfiguration.java

@Bean
public TextEncryptor textEncryptor() {
    return Encryptors.queryableText(textEncryptorPassword, textEncryptorSalt);
}

From source file:com.iservport.auth.SecurityWebConfig.java

/**
 * Criptografia./*from w  w w.  java  2  s.c om*/
 */
@Bean
public TextEncryptor textEncryptor() {
    return Encryptors.queryableText(env.getProperty("security.encryptPassword", "password"),
            env.getProperty("security.encryptSalt", "00"));
}