org.mpisws.p2p.transport.peerreview.history.hasher
Class SHA1HashProvider

java.lang.Object
  extended by org.mpisws.p2p.transport.peerreview.history.hasher.SHA1HashProvider
All Implemented Interfaces:
HashProvider

public class SHA1HashProvider
extends Object
implements HashProvider


Constructor Summary
SHA1HashProvider()
           
 
Method Summary
 byte[] getEmptyHash()
           
 short getHashSizeBytes()
           
 byte[] hash(ByteBuffer... hashMe)
           
 byte[] hash(long seq, short type, byte[] nodeHash, byte[] contentHash)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SHA1HashProvider

public SHA1HashProvider()
                 throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException
Method Detail

getEmptyHash

public byte[] getEmptyHash()
Specified by:
getEmptyHash in interface HashProvider

getHashSizeBytes

public short getHashSizeBytes()
Specified by:
getHashSizeBytes in interface HashProvider

hash

public byte[] hash(long seq,
                   short type,
                   byte[] nodeHash,
                   byte[] contentHash)
Specified by:
hash in interface HashProvider

hash

public byte[] hash(ByteBuffer... hashMe)
Specified by:
hash in interface HashProvider


Copyright © 2010. All Rights Reserved.