Examples of clearPassword()


Examples of com.art.anette.datamodel.dataobjects.simple.Employee.clearPassword()

    private static Object adjustObjectForSending(Object obj) {
        if (obj instanceof Employee) {
            Employee employee = (Employee) obj;
            Employee cloned = employee.clone();
            cloned.clearPassword();
            return cloned;
        }
        return obj;
    }
View Full Code Here

Examples of com.sun.jdmk.security.sasl.AuthenticateCallback.clearPassword()

        } catch (IOException e) {
            throw new SaslException(msg, e);
        } catch (UnsupportedCallbackException e) {
            throw new SaslException(msg, e);
        }
  authnCb.clearPassword();
  if (!authnCb.isAuthenticated()) {
            throw new AuthenticationException(msg);
  }
    }
View Full Code Here

Examples of javax.crypto.spec.PBEKeySpec.clearPassword()

            throws GeneralSecurityException {
        if (hashAlgorithm != null) {
            PBEKeySpec passwordKeySpec = new PBEKeySpec(password, salt, iterations, 256);
            SecretKeyFactory secretKeyFactory = SecretKeyFactory.getInstance(hashAlgorithm);
            SecretKey passwordKey = secretKeyFactory.generateSecret(passwordKeySpec);
            passwordKeySpec.clearPassword();
            return BinTools.bin2hex(passwordKey.getEncoded());
        } else {
            PBKDF2Parameters params = new PBKDF2Parameters("HmacSHA1", "ISO-8859-1", salt, iterations);
            PBKDF2 pbkdf2 = new PBKDF2Engine(params);
            return BinTools.bin2hex(pbkdf2.deriveKey(new String(password)));
View Full Code Here

Examples of javax.crypto.spec.PBEKeySpec.clearPassword()

        harness.check(Arrays.equals(pbeKeySpec.getPassword(), originalPassword),
                      "Changing the value returned from getPassword() changed"
                      + " the stored password. MUST return a COPY of the "
                      + "password");
        // this should clear just the copy of password, not the password itself
        pbeKeySpec.clearPassword();
        harness.check(Arrays.equals(password, "HelloWorld".toCharArray()),
                      "clearPassword() cleared the actual password. MUST store "
                      + "a COPY of the password");

        String msg = "Calling getPassword() after clearPassword() MUST throw "
View Full Code Here

Examples of javax.crypto.spec.PBEKeySpec.clearPassword()

      if (hashAlgorithm != null)
      {
         PBEKeySpec passwordKeySpec = new PBEKeySpec(password, salt, iterations, 256);
         SecretKeyFactory secretKeyFactory = SecretKeyFactory.getInstance(hashAlgorithm);
         SecretKey passwordKey = secretKeyFactory.generateSecret(passwordKeySpec);
         passwordKeySpec.clearPassword();
         return BinTools.bin2hex(passwordKey.getEncoded());
      }
      else
      {
         PBKDF2Parameters params = new PBKDF2Parameters("HmacSHA1", "ISO-8859-1", salt, iterations);
View Full Code Here

Examples of javax.crypto.spec.PBEKeySpec.clearPassword()

      if (hashAlgorithm != null)
      {
         PBEKeySpec passwordKeySpec = new PBEKeySpec(password, salt, iterations, 256);
         SecretKeyFactory secretKeyFactory = SecretKeyFactory.getInstance(hashAlgorithm);
         SecretKey passwordKey = secretKeyFactory.generateSecret(passwordKeySpec);
         passwordKeySpec.clearPassword();
         return BinTools.bin2hex(passwordKey.getEncoded());
      }
      else
      {
         PBKDF2Parameters params = new PBKDF2Parameters("HmacSHA1", "ISO-8859-1", salt, iterations);
View Full Code Here

Examples of javax.crypto.spec.PBEKeySpec.clearPassword()

            LogFilter.getInstance().addSecretData(passphrase.toString(),"X",LogFilter.FILTER_SECRETS);

            SecretKeyFactory fac=SecretKeyFactory.getInstance("PBEWithMD5AndDES");
            PBEKeySpec keyspec=new PBEKeySpec(passphrase.toString().toCharArray());
            SecretKey passportKey=fac.generateSecret(keyspec);
            keyspec.clearPassword();
            passphrase=null;

            return passportKey;
        } catch (Exception ex) {
            throw new HBCI_Exception(HBCIUtilsInternal.getLocMsg("EXCMSG_PASSPORT_KEYCALCERR"),ex);
View Full Code Here

Examples of javax.crypto.spec.PBEKeySpec.clearPassword()

    final int CIPHER_ITERATIONS=987;

    SecretKeyFactory fac=SecretKeyFactory.getInstance("PBEWithMD5AndDES");
    PBEKeySpec keyspec=new PBEKeySpec(args[1].toCharArray());
    SecretKey passportKey=fac.generateSecret(keyspec);
    keyspec.clearPassword();

    PBEParameterSpec paramspec=new PBEParameterSpec(CIPHER_SALT,CIPHER_ITERATIONS);
    Cipher cipher=Cipher.getInstance("PBEWithMD5AndDES");
    cipher.init(Cipher.DECRYPT_MODE,passportKey,paramspec);
View Full Code Here

Examples of javax.crypto.spec.PBEKeySpec.clearPassword()

     * is cleared after the method call.
     */
    public void testClearPassword() {
        char[] password = new char[] {'1', '2', '3', '4', '5'};
        PBEKeySpec pbeks = new PBEKeySpec(password);
        pbeks.clearPassword();
        try {
            pbeks.getPassword();
            fail("An IllegalStateException should be was thrown "
                    + "after the clearing the password.");
        } catch (IllegalStateException e) {
View Full Code Here

Examples of javax.crypto.spec.PBEKeySpec.clearPassword()

     * is cleared after the method call.
     */
    public void testClearPassword() {
        char[] password = new char[] {'1', '2', '3', '4', '5'};
        PBEKeySpec pbeks = new PBEKeySpec(password);
        pbeks.clearPassword();
        try {
            pbeks.getPassword();
            fail("An IllegalStateException should be was thrown "
                    + "after the clearing the password.");
        } catch (IllegalStateException e) {
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.