|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsdsi.Obj jsdsi.Hash
A cryptographic hash.
Field Summary |
Fields inherited from class jsdsi.Obj |
_obj |
Constructor Summary | |
Hash(DigestAlgoEnum a,
byte[] d,
java.net.URI[] u)
Creates a new Hash . |
|
Hash(DigestAlgoEnum a,
Obj o,
java.net.URI[] u)
Creates a new Hash . |
|
Hash(java.lang.String a,
byte[] d)
Deprecated. use Hash(jsdsi.util.DigestAlgoEnum, byte[], java.net.URI[]) |
|
Hash(java.lang.String a,
byte[] d,
java.net.URI[] u)
Deprecated. use Hash(jsdsi.util.DigestAlgoEnum, byte[], URI[]) |
|
Hash(java.lang.String a,
Obj o)
Deprecated. use Hash(jsdsi.util.DigestAlgoEnum, jsdsi.Obj, java.net.URI[]) |
|
Hash(java.lang.String a,
Obj o,
java.net.URI[] u)
Deprecated. use Hash(jsdsi.util.DigestAlgoEnum, Obj, URI[]) |
Method Summary | |
static Hash |
create(DigestAlgoEnum a,
byte[] d,
java.net.URI[] u)
Creates a new Hash using a given algorithm name, a
value to hash, and an array of URIs. |
static Hash |
create(DigestAlgoEnum a,
java.io.InputStream is,
java.net.URI[] u)
Creates a new Hash of the data from the given
InputStream, using the given algorithm |
static Hash |
create(java.lang.String a,
byte[] d,
java.net.URI[] u)
Deprecated. use create(jsdsi.util.DigestAlgoEnum, byte[], java.net.URI[]) |
static Hash |
create(java.lang.String a,
java.io.InputStream is,
java.net.URI[] u)
Deprecated. use create(jsdsi.util.DigestAlgoEnum, java.io.InputStream, java.net.URI[]) |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getAlgorithm()
|
byte[] |
getData()
|
DigestAlgoEnum |
getDigest()
|
java.net.URI[] |
getURIs()
|
int |
hashCode()
|
static Hash |
parseHash(SexpList l)
|
SexpList |
toSexp()
Creates an SexpList -representation from this SDSI-object. |
Methods inherited from class jsdsi.Obj |
parseObj, parseObj, readResolve, toByteArray, toString, toString, toTransport |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Hash(DigestAlgoEnum a, byte[] d, java.net.URI[] u)
Hash
.
a
- hash algorithmd
- hash value (not the data to hash)u
- URIs of the hashed data (may be null
).public Hash(DigestAlgoEnum a, Obj o, java.net.URI[] u)
Hash
.
a
- hash algorithm.o
- JSDSI object to hash.u
- URIs of the hashed data (may be null
).public Hash(java.lang.String a, byte[] d, java.net.URI[] u)
Hash(jsdsi.util.DigestAlgoEnum, byte[], URI[])
Hash
.
a
- SPKI hash algorithm named
- hash value (not the data to hash)u
- URIs of the hashed datapublic Hash(java.lang.String a, Obj o, java.net.URI[] u)
Hash(jsdsi.util.DigestAlgoEnum, Obj, URI[])
Hash
.
a
- hash algorithm name.o
- object to hash.u
- URIs of the hashed data.public Hash(java.lang.String a, byte[] d)
Hash(jsdsi.util.DigestAlgoEnum, byte[], java.net.URI[])
Hash
from an algorithm name and a byte array
that contains a hash value.
a
- name of the hash algorithm used.d
- the value of the hash (not the data to hash).public Hash(java.lang.String a, Obj o)
Hash(jsdsi.util.DigestAlgoEnum, jsdsi.Obj, java.net.URI[])
Hash
from an algorithm name and an object.
a
- name of the hash algorithm used.o
- JSDSI object to calculate the hash value from.Method Detail |
public static Hash create(DigestAlgoEnum a, byte[] d, java.net.URI[] u)
Hash
using a given algorithm name, a
value to hash, and an array of URIs.
a
- hash algorithmd
- data to hashu
- URIs of the data to hash
null
)public static Hash create(DigestAlgoEnum a, java.io.InputStream is, java.net.URI[] u)
Hash
of the data from the given
InputStream, using the given algorithm
a
- hash algorithmis
- data to hashu
- URIs of the data being hashed (may be null
)
public static Hash create(java.lang.String a, byte[] d, java.net.URI[] u) throws java.security.NoSuchAlgorithmException
create(jsdsi.util.DigestAlgoEnum, byte[], java.net.URI[])
Hash
using a given algorithm name, a
value to hash, and an array of URIs.
a
- hash algorithm named
- data to hashu
- URIs of the data to hash
java.security.NoSuchAlgorithmException
public static Hash create(java.lang.String a, java.io.InputStream is, java.net.URI[] u) throws java.security.NoSuchAlgorithmException
create(jsdsi.util.DigestAlgoEnum, java.io.InputStream, java.net.URI[])
Hash
of the data from the given
InputStream, using the given algorithm.
a
- hash algorithm nameis
- data to hashu
- URIs of the data being hashed
java.security.NoSuchAlgorithmException
public DigestAlgoEnum getDigest()
public java.lang.String getAlgorithm()
public byte[] getData()
public java.net.URI[] getURIs()
public boolean equals(java.lang.Object o)
equals
in class Obj
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Obj
Object.hashCode()
public SexpList toSexp()
Obj
SexpList
-representation from this SDSI-object.
toSexp
in class Obj
SexpList
that represents this SDSI-object.public static Hash parseHash(SexpList l) throws SexpParseException
SexpParseException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |