Package jonelo.jacksum.algorithm

Examples of jonelo.jacksum.algorithm.AbstractChecksum.update()


      checksum = JacksumAPI.getChecksumInstance(WHIRLPOOL);
    } catch (NoSuchAlgorithmException exc) {
      log.error(null, exc);
      return null;
    }
    checksum.update(rawPass.getBytes());
    encodedPassword = checksum.getFormattedValue();
    return encodedPassword;
  }

  @Override
View Full Code Here


   */
  public String encrypt(String password) throws Exception
  {
    AbstractChecksum checksum = JacksumAPI.getChecksumInstance(name);
    checksum.setEncoding("BASE64");
    checksum.update(password.getBytes());
    return checksum.format("#CHECKSUM");
  }
}
View Full Code Here

  @Override
  public String encrypt(String password) throws NoSuchAlgorithmException, UnsupportedEncodingException
  {
    AbstractChecksum whirlpool2 = JacksumAPI.getChecksumInstance("whirlpool2");
    whirlpool2.setEncoding("BASE64");
    whirlpool2.update(password.getBytes("UTF-8"));
    return whirlpool2.format("#CHECKSUM");
  }
}
View Full Code Here

  @Override
  public String encrypt(String password) throws NoSuchAlgorithmException, UnsupportedEncodingException
  {
    AbstractChecksum whirlpool2 = JacksumAPI.getChecksumInstance("whirlpool2");
    whirlpool2.update(password.getBytes("UTF-8"));
    byte[] stdHash = whirlpool2.getByteArray();
    whirlpool2 = JacksumAPI.getChecksumInstance("whirlpool2");
    whirlpool2.setEncoding("BASE64");
    whirlpool2.update(Config.DOUBLE_WHIRPOOL_SALT.getBytes("UTF-8"));
    whirlpool2.update(stdHash);
View Full Code Here

    AbstractChecksum whirlpool2 = JacksumAPI.getChecksumInstance("whirlpool2");
    whirlpool2.update(password.getBytes("UTF-8"));
    byte[] stdHash = whirlpool2.getByteArray();
    whirlpool2 = JacksumAPI.getChecksumInstance("whirlpool2");
    whirlpool2.setEncoding("BASE64");
    whirlpool2.update(Config.DOUBLE_WHIRPOOL_SALT.getBytes("UTF-8"));
    whirlpool2.update(stdHash);
    String pt1 = whirlpool2.format("#CHECKSUM");
    whirlpool2 = JacksumAPI.getChecksumInstance("whirlpool2");
    whirlpool2.setEncoding("BASE64");
    whirlpool2.update(stdHash);
View Full Code Here

    whirlpool2.update(password.getBytes("UTF-8"));
    byte[] stdHash = whirlpool2.getByteArray();
    whirlpool2 = JacksumAPI.getChecksumInstance("whirlpool2");
    whirlpool2.setEncoding("BASE64");
    whirlpool2.update(Config.DOUBLE_WHIRPOOL_SALT.getBytes("UTF-8"));
    whirlpool2.update(stdHash);
    String pt1 = whirlpool2.format("#CHECKSUM");
    whirlpool2 = JacksumAPI.getChecksumInstance("whirlpool2");
    whirlpool2.setEncoding("BASE64");
    whirlpool2.update(stdHash);
    whirlpool2.update((Config.DOUBLE_WHIRPOOL_SALT + pt1).getBytes("UTF-8"));
View Full Code Here

    whirlpool2.update(Config.DOUBLE_WHIRPOOL_SALT.getBytes("UTF-8"));
    whirlpool2.update(stdHash);
    String pt1 = whirlpool2.format("#CHECKSUM");
    whirlpool2 = JacksumAPI.getChecksumInstance("whirlpool2");
    whirlpool2.setEncoding("BASE64");
    whirlpool2.update(stdHash);
    whirlpool2.update((Config.DOUBLE_WHIRPOOL_SALT + pt1).getBytes("UTF-8"));
    String pt2 = whirlpool2.format("#CHECKSUM");
    return pt1 + '|' + pt2;
  }
}
View Full Code Here

    whirlpool2.update(stdHash);
    String pt1 = whirlpool2.format("#CHECKSUM");
    whirlpool2 = JacksumAPI.getChecksumInstance("whirlpool2");
    whirlpool2.setEncoding("BASE64");
    whirlpool2.update(stdHash);
    whirlpool2.update((Config.DOUBLE_WHIRPOOL_SALT + pt1).getBytes("UTF-8"));
    String pt2 = whirlpool2.format("#CHECKSUM");
    return pt1 + '|' + pt2;
  }
}
View Full Code Here

  @Override
  public String encrypt(String password) throws NoSuchAlgorithmException, UnsupportedEncodingException
  {
    AbstractChecksum sha1 = JacksumAPI.getChecksumInstance("sha1");
    sha1.setEncoding("BASE64");
    sha1.update(password.getBytes("UTF-8"));
    return sha1.format("#CHECKSUM");
  }
}
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.