aQute.libg.cryptography
Class Digester<T extends Digest>

java.lang.Object
  extended by java.io.OutputStream
      extended by aQute.libg.cryptography.Digester<T>
All Implemented Interfaces:
Closeable, Flushable

public abstract class Digester<T extends Digest>
extends OutputStream


Field Summary
protected  MessageDigest md
           
 
Constructor Summary
Digester(MessageDigest instance)
           
 
Method Summary
abstract  T digest()
           
abstract  T digest(byte[] bytes)
           
 T from(InputStream in)
           
abstract  String getAlgorithm()
           
 MessageDigest getMessageDigest()
           
 void write(byte[] buffer, int offset, int length)
           
 void write(int b)
           
 
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
 

Field Detail

md

protected MessageDigest md
Constructor Detail

Digester

public Digester(MessageDigest instance)
Method Detail

write

public void write(byte[] buffer,
                  int offset,
                  int length)
           throws IOException
Overrides:
write in class OutputStream
Throws:
IOException

write

public void write(int b)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException

getMessageDigest

public MessageDigest getMessageDigest()
                               throws Exception
Throws:
Exception

from

public T from(InputStream in)
                      throws Exception
Throws:
Exception

digest

public abstract T digest()
                                 throws Exception
Throws:
Exception

digest

public abstract T digest(byte[] bytes)
                                 throws Exception
Throws:
Exception

getAlgorithm

public abstract String getAlgorithm()


Copyright © 2012 aQute SARL. All Rights Reserved.