samples/messagedigest/src/spi/DigestImplementation.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:51:46 +0200
changeset 38 8f9ed9c4a97b
permissions -rw-r--r--
spi part
jtulach@38
     1
/*
jtulach@38
     2
 * To change this template, choose Tools | Templates
jtulach@38
     3
 * and open the template in the editor.
jtulach@38
     4
 */
jtulach@38
     5
jtulach@38
     6
package spi;
jtulach@38
     7
jtulach@38
     8
import java.nio.ByteBuffer;
jtulach@38
     9
jtulach@38
    10
/**
jtulach@38
    11
 *
jtulach@38
    12
 * @author Jaroslav Tulach
jtulach@38
    13
 */
jtulach@38
    14
public abstract class DigestImplementation {
jtulach@38
    15
    final String name;
jtulach@38
    16
    
jtulach@38
    17
    protected DigestImplementation(String algorithm) {
jtulach@38
    18
        this.name = algorithm;
jtulach@38
    19
    }
jtulach@38
    20
    
jtulach@38
    21
    protected abstract void update(ByteBuffer bb);
jtulach@38
    22
    protected abstract byte[] digest();
jtulach@38
    23
}