aQute.libg.cryptography
Class Digester<T extends Digest>
java.lang.Object
java.io.OutputStream
aQute.libg.cryptography.Digester<T>
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public abstract class Digester<T extends Digest>
- extends java.io.OutputStream
|
Field Summary |
protected java.security.MessageDigest |
md
|
|
Constructor Summary |
Digester(java.security.MessageDigest instance)
|
| Methods inherited from class java.io.OutputStream |
close, flush, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
md
protected java.security.MessageDigest md
Digester
public Digester(java.security.MessageDigest instance)
write
public void write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
- Overrides:
write in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(int b)
throws java.io.IOException
- Specified by:
write in class java.io.OutputStream
- Throws:
java.io.IOException
getMessageDigest
public java.security.MessageDigest getMessageDigest()
throws java.lang.Exception
- Throws:
java.lang.Exception
from
public T from(java.io.InputStream in)
throws java.lang.Exception
- Throws:
java.lang.Exception
digest
public abstract T digest()
throws java.lang.Exception
- Throws:
java.lang.Exception
digest
public abstract T digest(byte[] bytes)
throws java.lang.Exception
- Throws:
java.lang.Exception
getAlgorithm
public abstract java.lang.String getAlgorithm()