home *** CD-ROM | disk | FTP | other *** search
- package java.security;
-
- public abstract class MessageDigestSpi {
- protected int engineGetDigestLength() {
- return 0;
- }
-
- protected abstract void engineUpdate(byte var1);
-
- protected abstract void engineUpdate(byte[] var1, int var2, int var3);
-
- protected abstract byte[] engineDigest();
-
- protected int engineDigest(byte[] var1, int var2, int var3) throws DigestException {
- byte[] var4 = this.engineDigest();
- if (var3 < var4.length) {
- throw new DigestException("partial digests not returned");
- } else if (var1.length - var2 < var4.length) {
- throw new DigestException("insufficient space in the output buffer to store the digest");
- } else {
- System.arraycopy(var4, 0, var1, var2, var4.length);
- return var4.length;
- }
- }
-
- protected abstract void engineReset();
-
- public Object clone() throws CloneNotSupportedException {
- if (this instanceof Cloneable) {
- return super.clone();
- } else {
- throw new CloneNotSupportedException();
- }
- }
- }
-