org.apache.cassandra.utils
Class MD5Digest
java.lang.Object
org.apache.cassandra.utils.MD5Digest
public class MD5Digest
- extends java.lang.Object
The result of the computation of an MD5 digest.
A MD5 is really just a byte[] but arrays are a no go as map keys. We could
wrap it in a ByteBuffer but:
1. MD5Digest is a more explicit name than ByteBuffer to represent a md5.
2. Using our own class allows to use our FastByteComparison for equals.
Field Summary |
byte[] |
bytes
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
bytes
public final byte[] bytes
wrap
public static MD5Digest wrap(byte[] digest)
compute
public static MD5Digest compute(byte[] toHash)
compute
public static MD5Digest compute(java.lang.String toHash)
hashCode
public final int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public final boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2012 The Apache Software Foundation