break; case MD5: authenticated = MessageDigest.isEqual(FBUtilities.threadLocalMD5Digest().digest(password.getBytes()), Hex.hexToBytes(props.getProperty(username))); break;
public static ByteBuffer guidAsBytes(Random random, String hostId, long time) { StringBuilder sbValueBeforeMD5 = new StringBuilder(); long rand = random.nextLong(); sbValueBeforeMD5.append(hostId) .append(":") .append(Long.toString(time)) .append(":") .append(Long.toString(rand)); String valueBeforeMD5 = sbValueBeforeMD5.toString(); return ByteBuffer.wrap(FBUtilities.threadLocalMD5Digest().digest(valueBeforeMD5.getBytes())); }
public static ByteBuffer guidAsBytes(Random random, String hostId, long time) { StringBuilder sbValueBeforeMD5 = new StringBuilder(); long rand = random.nextLong(); sbValueBeforeMD5.append(hostId) .append(":") .append(Long.toString(time)) .append(":") .append(Long.toString(rand)); String valueBeforeMD5 = sbValueBeforeMD5.toString(); return ByteBuffer.wrap(FBUtilities.threadLocalMD5Digest().digest(valueBeforeMD5.getBytes())); }
public static ByteBuffer guidAsBytes(Random random, String hostId, long time) { StringBuilder sbValueBeforeMD5 = new StringBuilder(); long rand = random.nextLong(); sbValueBeforeMD5.append(hostId) .append(":") .append(Long.toString(time)) .append(":") .append(Long.toString(rand)); String valueBeforeMD5 = sbValueBeforeMD5.toString(); return ByteBuffer.wrap(FBUtilities.threadLocalMD5Digest().digest(valueBeforeMD5.getBytes())); }
public static ByteBuffer guidAsBytes(Random random, String hostId, long time) { StringBuilder sbValueBeforeMD5 = new StringBuilder(); long rand = random.nextLong(); sbValueBeforeMD5.append(hostId) .append(":") .append(Long.toString(time)) .append(":") .append(Long.toString(rand)); String valueBeforeMD5 = sbValueBeforeMD5.toString(); return ByteBuffer.wrap(FBUtilities.threadLocalMD5Digest().digest(valueBeforeMD5.getBytes())); }
public static ByteBuffer digest(ColumnFamily cf) { MessageDigest digest = FBUtilities.threadLocalMD5Digest(); if (cf != null) cf.updateDigest(digest); return ByteBuffer.wrap(digest.digest()); }
public static ByteBuffer guidAsBytes() { StringBuilder sbValueBeforeMD5 = new StringBuilder(); long time = System.currentTimeMillis(); long rand = 0; rand = myRand.nextLong(); sbValueBeforeMD5.append(s_id) .append(":") .append(Long.toString(time)) .append(":") .append(Long.toString(rand)); String valueBeforeMD5 = sbValueBeforeMD5.toString(); return ByteBuffer.wrap(FBUtilities.threadLocalMD5Digest().digest(valueBeforeMD5.getBytes())); }
public static MD5Digest compute(byte[] toHash) { return new MD5Digest(FBUtilities.threadLocalMD5Digest().digest(toHash)); }
public static MD5Digest compute(byte[] toHash) { return new MD5Digest(FBUtilities.threadLocalMD5Digest().digest(toHash)); }
public static MD5Digest compute(byte[] toHash) { return new MD5Digest(FBUtilities.threadLocalMD5Digest().digest(toHash)); }
public static MD5Digest compute(byte[] toHash) { return new MD5Digest(FBUtilities.threadLocalMD5Digest().digest(toHash)); }
public static MD5Digest compute(String toHash) { try { return compute(toHash.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e.getMessage()); } }
protected static ByteBuffer makeDigest(UnfilteredPartitionIterator iterator, ReadCommand command) { MessageDigest digest = FBUtilities.threadLocalMD5Digest(); UnfilteredPartitionIterators.digest(command, iterator, digest, command.digestVersion()); return ByteBuffer.wrap(digest.digest()); }
protected static ByteBuffer makeDigest(UnfilteredPartitionIterator iterator, ReadCommand command) { MessageDigest digest = FBUtilities.threadLocalMD5Digest(); UnfilteredPartitionIterators.digest(command, iterator, digest, command.digestVersion()); return ByteBuffer.wrap(digest.digest()); }
protected static ByteBuffer makeDigest(UnfilteredPartitionIterator iterator, ReadCommand command) { MessageDigest digest = FBUtilities.threadLocalMD5Digest(); UnfilteredPartitionIterators.digest(command, iterator, digest, command.digestVersion()); return ByteBuffer.wrap(digest.digest()); }