mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
12.03.2007 47be44124da7f6ad42bed03a24701ca07c00918d
opends/src/server/org/opends/server/util/Crypt.java
@@ -33,7 +33,7 @@
/*        All Rights Reserved   */
package org.opends.server.util;
import java.util.concurrent.locks.ReentrantLock;
/**
 * UNIX Crypt cipher, ported from the Sun OpenSolaris project.
@@ -373,7 +373,7 @@
    }
  }
  private ReentrantLock digestLock = new ReentrantLock();
  private Object digestLock = new Object();
  /**
   * Encode the supplied password in unix crypt form with the provided
@@ -387,16 +387,11 @@
   * */
  public byte[] crypt(byte[] pw, byte[] salt)
  {
    digestLock.lock();
    int[] r;
    try
    synchronized (digestLock)
    {
      r = _crypt(pw, salt);
    }
    finally
    {
      digestLock.unlock();
    }
    //TODO: crypt always returns same size array?  So don't mess
    // around calculating the number of zeros at the end.