public class Hash extends AbstractSchemeValue implements java.io.Serializable
This is the hash of the binary media file. It can appear multiple times as long as each instance is a different algo. It has 1 optional attribute.
<media:hash algo="md5">dfdec888b72151965a34b4b59031290a</media:hash>
algo indicates the algorithm used to create the hash. Possible values are 'md5' and 'sha-1'. Default value is 'md5'. It is an optional attribute.
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
Constructor and Description |
---|
Hash(java.lang.String value)
Creates a new instance of Hash assuming the default algorithm of MD5
|
Hash(java.lang.String algorithm,
java.lang.String value) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAlgorithm()
Alsorithm used for the hash
|
int |
hashCode() |
java.lang.String |
toString() |
getScheme, getValue
private static final long serialVersionUID
public Hash(java.lang.String algorithm, java.lang.String value)
algorithm
- algoright usedvalue
- value of the hashpublic Hash(java.lang.String value)
algorithm
- algoright usedpublic java.lang.String getAlgorithm()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object