Examples of IPassword


Examples of net.sourceforge.javautil.common.password.IPassword

    byte[] key = null;
    if (config != null && config.source() == Source.PASSWORD_LOCKER) {
      if ("".equals( config.sourceName() )) throw new IllegalArgumentException("Password locker source name must be provider for: " + clazz);
      if (PasswordContext.get() == null) throw new IllegalStateException("No password locker available for the current context");
     
      IPassword pw = PasswordContext.get().getPassword(config.sourceName());
      if (pw == null) throw new IllegalArgumentException("No such password in current context locker: " + config.sourceName());
     
      key = pw.getPassword();
    } else {
      ClassProperty property = clazz.getProperty(EncryptionKey.class);
      if (property == null) throw new IllegalStateException("No encryption key property available for: " + clazz);
     
      key = ReflectionUtil.coerce(byte[].class, property.getValue(instance));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.