private long byteCount;
- /**
- * Standard constructor
- */
- protected GeneralDigest()
- {
- xBuf = new byte[4];
- xBufOff = 0;
- }
-
- /**
- * Copy constructor. We are using copy constructors in place
- * of the Object.clone() interface as this interface is not
- * supported by J2ME.
- */
- protected GeneralDigest(GeneralDigest t)
- {
+ /**
+ * Standard constructor
+ */
+ protected GeneralDigest()
+ {
+ xBuf = new byte[4];
+ xBufOff = 0;
+ }
+
+ /**
+ * Copy constructor. We are using copy constructors in place
+ * of the Object.clone() interface as this interface is not
+ * supported by J2ME.
+ */
+ protected GeneralDigest(GeneralDigest t)
+ {
xBuf = new byte[t.xBuf.length];
- System.arraycopy(t.xBuf, 0, xBuf, 0, t.xBuf.length);
+ System.arraycopy(t.xBuf, 0, xBuf, 0, t.xBuf.length);
- xBufOff = t.xBufOff;
- byteCount = t.byteCount;
- }
+ xBufOff = t.xBufOff;
+ byteCount = t.byteCount;
+ }
public void update(
byte in)
byteCount = 0;
xBufOff = 0;
- for ( int i = 0; i < xBuf.length; i++ ) {
- xBuf[i] = 0;
- }
+ for ( int i = 0; i < xBuf.length; i++ ) {
+ xBuf[i] = 0;
+ }
}
protected abstract void processWord(byte[] in, int inOff);