Codota Logo
leap.lang.codec
Code IndexAdd Codota to your IDE (free)

How to use leap.lang.codec

Best Java code snippets using leap.lang.codec (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: org.leapframework/leap-lang

/**
 * Calculates the MD5 digest and returns the value as a base64 string.
 * 
 * @param data Data to digest
 * @return MD5 digest as a base64 string
 */
public static String md5Base64(String data) {
  return Base64.encode(md5(data));
}    

origin: org.leapframework/leap-lang

/**
 * Calculates the SHA-1 digest and returns the value as a hex string.
 * 
 * @param data Data to digest
 * @return SHA-1 digest as a hex string
 */
public static String shaHex(String data) {
  return Hex.encode(sha(data));
}    
origin: org.leapframework/leap-lang

/**
 * Calculates the MD5 digest and returns the value as a 32 character hex string.
 * 
 * @param data Data to digest
 * @return MD5 digest as a hex string
 */
public static String md5Hex(byte[] data) {
  return Hex.encode(md5(data));
}
origin: org.leapframework/leap-lang

/**
 * Calculates the SHA-512 digest and returns the value as a hex string.
 * <p>
 * Throws a <code>RuntimeException</code> on JRE versions prior to 1.4.0.
 * </p>
 * 
 * @param data Data to digest
 * @return SHA-512 digest as a hex string
 * @since 1.4
 */
public static String sha512Hex(String data) {
  return Hex.encode(sha512(data));
}
origin: org.leapframework/leap-lang

/**
 * Calculates the SHA-384 digest and returns the value as a hex string.
 * <p>
 * Throws a <code>RuntimeException</code> on JRE versions prior to 1.4.0.
 * </p>
 * 
 * @param data Data to digest
 * @return SHA-384 digest as a hex string
 * @since 1.4
 */
public static String sha384Hex(String data) {
  return Hex.encode(sha384(data));
}
origin: org.leapframework/leap-lang

/**
 * Calculates the SHA-256 digest and returns the value as a hex string.
 * <p>
 * Throws a <code>RuntimeException</code> on JRE versions prior to 1.4.0.
 * </p>
 * 
 * @param data Data to digest
 * @return SHA-256 digest as a hex string
 * @since 1.4
 */
public static String sha256Hex(String data) {
  return Hex.encode(sha256(data));
}
origin: org.leapframework/leap-lang

/**
 * Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.
 * The returned array will be double the length of the passed array, as it takes two characters to represent any
 * given byte.
 * 
 * @param data
 *            a byte[] to convert to Hex characters
 * @return A char[] containing hexadecimal characters
 */
public static char[] encodeHex(byte[] data) {
  return encodeHex(data, true);
}
origin: org.leapframework/leap-lang

  /**
   * Returns an SHA-1 digest.
   * 
   * @return An SHA-1 digest instance.
   * @throws RuntimeException when a {@link java.security.NoSuchAlgorithmException} is caught.
   */
  private static MessageDigest getShaDigest() {
    return getDigest("SHA");
  }
}
origin: org.leapframework/leap-lang

/**
 * Calculates the MD5 digest and returns the value as a base64 string.
 */
public static String digest(byte[] data) {
  return Digests.md5Base64(data);
}

origin: org.leapframework/leap-lang

/**
 * Calculates the MD5 digest and returns the value as a base64 string.
 * 
 * @param data Data to digest
 * @return MD5 digest as a base64 string
 * @throws IOException On error reading from the stream
 * @since 1.4
 */
public static String md5Base64(InputStream data) throws IOException {
  return Base64.encode(md5(data));
}

origin: org.leapframework/leap-lang

/**
 * Calculates the SHA-1 digest and returns the value as a hex string.
 * 
 * @param data Data to digest
 * @return SHA-1 digest as a hex string
 */
public static String shaHex(byte[] data) {
  return Hex.encode(sha(data));
}
origin: org.leapframework/leap-lang

/**
 * Calculates the MD5 digest and returns the value as a 32 character hex string.
 * 
 * @param data Data to digest
 * @return MD5 digest as a hex string
 */
public static String md5Hex(String data) {
  return Hex.encode(md5(data));
}    
origin: org.leapframework/leap-lang

/**
 * Calculates the SHA-512 digest and returns the value as a hex string.
 * <p>
 * Throws a <code>RuntimeException</code> on JRE versions prior to 1.4.0.
 * </p>
 * 
 * @param data Data to digest
 * @return SHA-512 digest as a hex string
 * @since 1.4
 */
public static String sha512Hex(byte[] data) {
  return Hex.encode(sha512(data));
}
origin: org.leapframework/leap-lang

/**
 * Calculates the SHA-384 digest and returns the value as a hex string.
 * <p>
 * Throws a <code>RuntimeException</code> on JRE versions prior to 1.4.0.
 * </p>
 * 
 * @param data Data to digest
 * @return SHA-384 digest as a hex string
 * @since 1.4
 */
public static String sha384Hex(byte[] data) {
  return Hex.encode(sha384(data));
}
origin: org.leapframework/leap-lang

/**
 * Calculates the SHA-256 digest and returns the value as a hex string.
 * <p>
 * Throws a <code>RuntimeException</code> on JRE versions prior to 1.4.0.
 * </p>
 * 
 * @param data Data to digest
 * @return SHA-256 digest as a hex string
 * @since 1.4
 */
public static String sha256Hex(byte[] data) {
  return Hex.encode(sha256(data));
}
origin: org.leapframework/leap-lang

/**
 * Calculates the MD5 digest and returns the value as a base64 string.
 * 
 * @param data Data to digest
 * @return MD5 digest as a base64 string
 */
public static String md5Base64(byte[] data) {
  return Base64.encode(md5(data));
}

origin: org.leapframework/leap-lang

/**
 * Calculates the SHA-1 digest and returns the value as a hex string.
 * 
 * @param data Data to digest
 * @return SHA-1 digest as a hex string
 * @throws IOException On error reading from the stream
 * @since 1.4
 */
public static String shaHex(InputStream data) throws IOException {
  return Hex.encode(sha(data));
}
origin: org.leapframework/leap-lang

/**
 * Calculates the MD5 digest and returns the value as a 32 character hex string.
 * 
 * @param data Data to digest
 * @return MD5 digest as a hex string
 * @throws IOException On error reading from the stream
 * @since 1.4
 */
public static String md5Hex(InputStream data) throws IOException {
  return Hex.encode(md5(data));
}
origin: org.leapframework/leap-lang

/**
 * Calculates the SHA-512 digest and returns the value as a hex string.
 * <p>
 * Throws a <code>RuntimeException</code> on JRE versions prior to 1.4.0.
 * </p>
 * 
 * @param data Data to digest
 * @return SHA-512 digest as a hex string
 * @throws IOException On error reading from the stream
 * @since 1.4
 */
public static String sha512Hex(InputStream data) throws IOException {
  return Hex.encode(sha512(data));
}
origin: org.leapframework/leap-lang

/**
 * Calculates the SHA-384 digest and returns the value as a hex string.
 * <p>
 * Throws a <code>RuntimeException</code> on JRE versions prior to 1.4.0.
 * </p>
 * 
 * @param data Data to digest
 * @return SHA-384 digest as a hex string
 * @throws IOException On error reading from the stream
 * @since 1.4
 */
public static String sha384Hex(InputStream data) throws IOException {
  return Hex.encode(sha384(data));
}
leap.lang.codec

Most used classes

  • Base64
  • Hex
  • MD5
  • DecoderException
  • Digester
    Helper for working with the MessageDigest API. Performs the configured number of iterations of the h
  • EncoderException,
  • HexCommonsImpl,
  • Utf8
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now