sdsi
Class Hash
java.lang.Object
|
+--sdsi.SDSIObject
|
+--sdsi.SDSIPrincipal
|
+--sdsi.Hash
- All Implemented Interfaces:
- java.io.Serializable, Subject
- public class Hash
- extends SDSIPrincipal
- Author:
- Alexander Morcos, Sameer Ajmani
- See Also:
- Serialized Form
Constructor Summary |
Hash(SexpList l)
Creates a new Hash from a S-expression list. |
Hash(java.lang.String algorithm,
byte[] value)
|
Hash(java.lang.String algorithm,
SDSIObject s)
|
Method Summary |
static Hash |
create(java.lang.String algorithm,
byte[] value)
|
boolean |
equals(java.lang.Object object)
|
java.lang.String |
getAbbreviation()
Returns a single or double letter abbreviation this SDSIObject. |
Hash |
getHash()
|
java.lang.String |
getHashID()
|
byte[] |
getHashValue()
|
java.lang.String |
getType()
Returns a short string that represents the type of this SDSIObject. |
int |
hashCode()
|
java.lang.String |
toShortString()
Returns a short descriptive string representing this SDSIObject. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Hash
public Hash(SexpList l)
throws SexpParseException
- Creates a new Hash from a S-expression list.
- Throws:
SexpParseException
- if the list is not a correctly
formatted Hash.
Hash
public Hash(java.lang.String algorithm,
byte[] value)
throws java.security.NoSuchAlgorithmException,
SexpParseException
Hash
public Hash(java.lang.String algorithm,
SDSIObject s)
throws java.security.NoSuchAlgorithmException
create
public static Hash create(java.lang.String algorithm,
byte[] value)
throws java.security.NoSuchAlgorithmException,
SDSIException
java.security.NoSuchAlgorithmException
SDSIException
getHashID
public java.lang.String getHashID()
getHashValue
public byte[] getHashValue()
getType
public java.lang.String getType()
- Description copied from class:
SDSIObject
- Returns a short string that represents the type of this SDSIObject.
- Overrides:
getType
in class SDSIObject
- Returns:
- a string represent the type of SDSIObject we're dealing with.
getAbbreviation
public java.lang.String getAbbreviation()
- Description copied from class:
SDSIObject
- Returns a single or double letter abbreviation this SDSIObject.
- Specified by:
getAbbreviation
in class SDSIObject
- Returns:
- an abbreviated description of this SDSIObject.
toShortString
public java.lang.String toShortString()
- Description copied from class:
SDSIObject
- Returns a short descriptive string representing this SDSIObject.
- Specified by:
toShortString
in interface Subject
- Specified by:
toShortString
in class SDSIObject
- Returns:
- a short string description of this SDSIObject.
getHash
public Hash getHash()
- Overrides:
getHash
in class SDSIObject
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in class SDSIObject
hashCode
public int hashCode()
- Overrides:
hashCode
in class SDSIObject