MD5Digest (apache-cassandra API)
Date: 2014-10-21

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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `byte[]` | `bytes`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static MD5Digest` | `compute(byte[] toHash)`
    `static MD5Digest` | `compute(java.lang.String toHash)`
    `boolean` | `equals(java.lang.Object o)`
    `int` | `hashCode()`
    `java.lang.String` | `toString()`
    `static MD5Digest` | `wrap(byte[] digest)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### bytes

          public final byte[] bytes

  - ### Method Detail

    - #### 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 © 2014 The Apache Software Foundation