Example usage for org.springframework.security.crypto.bcrypt BCryptPasswordEncoder BCryptPasswordEncoder

List of usage examples for org.springframework.security.crypto.bcrypt BCryptPasswordEncoder BCryptPasswordEncoder

Introduction

In this page you can find the example usage for org.springframework.security.crypto.bcrypt BCryptPasswordEncoder BCryptPasswordEncoder.

Prototype

public BCryptPasswordEncoder() 

Source Link

Usage

From source file:org.cloud.mblog.utils.StringHelper.java

public static String encrypt(String plainText) {
    BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
    return passwordEncoder.encode(plainText);
}

From source file:org.cloud.mblog.utils.StringHelper.java

public static boolean checkPassword(String plainText, String encryptedText) {
    BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
    return passwordEncoder.matches(plainText, encryptedText);
}

From source file:org.cloudfoundry.identity.uaa.authentication.manager.AuthzAuthenticationManager.java

public AuthzAuthenticationManager(UaaUserDatabase cfusers, IdentityProviderProvisioning providerProvisioning) {
    this(cfusers, new BCryptPasswordEncoder(), providerProvisioning);
}

From source file:org.tightblog.ui.security.MultiFactorAuthenticationProvider.java

@Autowired
public MultiFactorAuthenticationProvider(UserCredentialsRepository userCredentialsRepository,
        UserDetailsService userDetailsService, MessageSource messageSource) {
    this.userCredentialsRepository = userCredentialsRepository;
    setPasswordEncoder(new BCryptPasswordEncoder());
    setUserDetailsService(userDetailsService);
    setMessageSource(messageSource);/*  w  ww . java2  s.co  m*/
}