/** * Generate a unique key. The key is a 32-character long sequence of hex * digits. * * @return A unique key as a long sequence of hex digits. */ public static String generateHexKey() { return toHex(generateBytesKey()); }
/** * Return an MD5 checksum for data in hex format. * * @param data The data to checksum. * @return MD5 checksum for the data in hex format. */ public static String getMD5(byte[] data) { return toHex(getMD5Bytes(data)); }
attrs.put("checksum", Utils.toHex(dis.getMessageDigest().digest())); attrs.put("checksum_algorithm", CSA); dis.close();
bitstream.setChecksum(Utils.toHex(dis.getMessageDigest().digest())); bitstream.setChecksumAlgorithm(CSA); } catch (NoSuchAlgorithmException nsae) {