Code example for HashFunction

Methods: newHasher

0
     * Protected ctor. There should not be an instance of this class. 
     * @param hashFunction 
     */ 
    protected AbstractChecksumProvider(HashFunction hashFunction) {
        this.hashFunction = hashFunction;
        this.hasher = this.hashFunction.newHasher();
    } 
 
    /** 
     * @see ChecksumProvider#putBytes(byte[]) 
     */ 
    public ChecksumProvider putBytes(byte[] byteArray) {
        return this.putBytes(byteArray, 0, byteArray.length);
    } 
 
    /** 
     * @see ChecksumProvider#putBytes(byte[], int, int) 
     */ 
    public ChecksumProvider putBytes(byte[] byteArray, int offset, int length) {
        this.verifyState(this.hashBytes, this.hashString);
Experience pair programming with AI  Get Codota for Java