We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d567d6 commit 205878eCopy full SHA for 205878e
pg/src/main/java/org/bouncycastle/bcpg/FingerprintUtil.java
@@ -1,5 +1,7 @@
1
package org.bouncycastle.bcpg;
2
3
+import org.bouncycastle.util.Pack;
4
+
5
public class FingerprintUtil
6
{
7
@@ -51,14 +53,7 @@ public static long longFromLeftMostBytes(byte[] bytes)
51
53
52
54
throw new IllegalArgumentException("Byte array MUST contain at least 8 bytes");
55
}
- return ((bytes[0] & 0xffL) << 56) |
- ((bytes[1] & 0xffL) << 48) |
56
- ((bytes[2] & 0xffL) << 40) |
57
- ((bytes[3] & 0xffL) << 32) |
58
- ((bytes[4] & 0xffL) << 24) |
59
- ((bytes[5] & 0xffL) << 16) |
60
- ((bytes[6] & 0xffL) << 8) |
61
- ((bytes[7] & 0xffL));
+ return Pack.bigEndianToLong(bytes, 0);
62
63
64
/**
0 commit comments