Package org.platformlayer.service.nexus.utils

Examples of org.platformlayer.service.nexus.utils.NexusLdapPasswords.encrypt()


  @Test
  public void testEncryption() throws Exception {
    NexusLdapPasswords passwords = new NexusLdapPasswords();

    String plaintext = "adminsecret";
    String ciphertext = passwords.encrypt(plaintext);
    System.out.println("ciphertext = " + ciphertext);

    assertStructure(ciphertext);

    String decrypted = passwords.decrypt(ciphertext);
View Full Code Here


  private String encryptNexusPassword(String ldapPassword) throws OpsException {
    NexusLdapPasswords nexusLdapPasswords = new NexusLdapPasswords();
    nexusLdapPasswords.addEscapeCharacters = false;
    try {
      return nexusLdapPasswords.encrypt(ldapPassword);
    } catch (Exception e) {
      ExceptionUtils.handleInterrupted(e);
      throw new OpsException("Error encrypting password", 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.