Package org.hdiv.config.annotation.builders.SecurityConfigBuilder

Examples of org.hdiv.config.annotation.builders.SecurityConfigBuilder.CipherConfigure


  @Bean
  public IKeyFactory keyFactory() {
    KeyFactory keyFactory = new KeyFactory();

    SecurityConfigBuilder builder = this.securityConfigBuilder();
    CipherConfigure config = builder.getCipherConfigure();
    if (config.getAlgorithm() != null) {
      keyFactory.setAlgorithm(config.getAlgorithm());
    }
    if (config.getKeySize() > 0) {
      keyFactory.setKeySize(config.getKeySize());
    }
    if (config.getPrngAlgorithm() != null) {
      keyFactory.setPrngAlgorithm(config.getPrngAlgorithm());
    }
    if (config.getProvider() != null) {
      keyFactory.setProvider(config.getProvider());
    }
    return keyFactory;
  }
View Full Code Here


  @Bean
  @Scope(BeanDefinition.SCOPE_PROTOTYPE)
  public ICipherHTTP cipherHTTP() {

    SecurityConfigBuilder builder = this.securityConfigBuilder();
    CipherConfigure config = builder.getCipherConfigure();

    CipherHTTP cipherHTTP = new CipherHTTP();
    if (config.getProvider() != null) {
      cipherHTTP.setProvider(config.getProvider());
    }
    if (config.getTransformation() != null) {
      cipherHTTP.setTransformation(config.getTransformation());
    }
    cipherHTTP.init();
    return cipherHTTP;
  }
View Full Code Here

TOP

Related Classes of org.hdiv.config.annotation.builders.SecurityConfigBuilder.CipherConfigure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.