author | Jaroslav Tulach <jtulach@netbeans.org> |
Sat, 14 Jun 2008 09:58:05 +0200 | |
changeset 152 | eb6f29070331 |
parent 47 | f464a16d553a |
child 153 | b5cbb797ec0a |
permissions | -rw-r--r-- |
jtulach@47 | 1 |
/* |
jtulach@47 | 2 |
* To change this template, choose Tools | Templates |
jtulach@47 | 3 |
* and open the template in the editor. |
jtulach@47 | 4 |
*/ |
jtulach@47 | 5 |
|
jtulach@47 | 6 |
package org.apidesign.spi.security; |
jtulach@47 | 7 |
|
jtulach@47 | 8 |
import java.nio.ByteBuffer; |
jtulach@47 | 9 |
|
jtulach@47 | 10 |
/** |
jtulach@47 | 11 |
* |
jtulach@47 | 12 |
* @author Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
jtulach@47 | 13 |
*/ |
jtulach@47 | 14 |
// BEGIN: day.end.bridges.Digestor |
jtulach@47 | 15 |
public abstract class Digestor<Data> { |
jtulach@47 | 16 |
protected abstract byte[] digest(Data data); |
jtulach@47 | 17 |
protected abstract Data create(String algorithm); |
jtulach@47 | 18 |
protected abstract void update(Data data, ByteBuffer input); |
jtulach@47 | 19 |
|
jtulach@152 | 20 |
// FINISH: day.end.bridges.Digestor |
jtulach@47 | 21 |
|
jtulach@47 | 22 |
|
jtulach@47 | 23 |
static { |
jtulach@47 | 24 |
// initializes the accessor, so the api package can call protected |
jtulach@47 | 25 |
// methods from this class |
jtulach@47 | 26 |
new DigestorAccessorImpl(); |
jtulach@47 | 27 |
} |
jtulach@47 | 28 |
} |
jtulach@47 | 29 |