diff --git a/core/java/src/org/bouncycastle/oldcrypto/digests/GeneralDigest.java b/core/java/src/org/bouncycastle/oldcrypto/digests/GeneralDigest.java index fe4808db4904a85894ffac68c7fc3d1c140dff38..85324b97631c53fa55c8240a09e7c53c04731c97 100644 --- a/core/java/src/org/bouncycastle/oldcrypto/digests/GeneralDigest.java +++ b/core/java/src/org/bouncycastle/oldcrypto/digests/GeneralDigest.java @@ -35,7 +35,7 @@ import org.bouncycastle.oldcrypto.Digest; public abstract class GeneralDigest implements Digest { - private byte[] xBuf; + private final byte[] xBuf; private int xBufOff; private long byteCount; diff --git a/core/java/src/org/bouncycastle/oldcrypto/digests/MD5Digest.java b/core/java/src/org/bouncycastle/oldcrypto/digests/MD5Digest.java index 178ab94c007177fc90412b302bb354975d22e269..250fb256f4f0b98ad9605009737cd416e8b0af45 100644 --- a/core/java/src/org/bouncycastle/oldcrypto/digests/MD5Digest.java +++ b/core/java/src/org/bouncycastle/oldcrypto/digests/MD5Digest.java @@ -11,7 +11,7 @@ public class MD5Digest private int H1, H2, H3, H4; // IV's - private int[] X = new int[16]; + private final int[] X = new int[16]; private int xOff; /** @@ -74,7 +74,7 @@ public class MD5Digest X[15] = (int)(bitLength >>> 32); } - private void unpackWord( + private static void unpackWord( int word, byte[] out, int outOff) @@ -157,7 +157,7 @@ public class MD5Digest /* * rotate int x left n bits. */ - private int rotateLeft( + private static int rotateLeft( int x, int n) { @@ -167,7 +167,7 @@ public class MD5Digest /* * F, G, H and I are the basic MD5 functions. */ - private int F( + private static int F( int u, int v, int w) @@ -175,7 +175,7 @@ public class MD5Digest return (u & v) | (~u & w); } - private int G( + private static int G( int u, int v, int w) @@ -183,7 +183,7 @@ public class MD5Digest return (u & w) | (v & ~w); } - private int H( + private static int H( int u, int v, int w) @@ -191,7 +191,7 @@ public class MD5Digest return u ^ v ^ w; } - private int K( + private static int K( int u, int v, int w)