MCPcopy Create free account
hub / github.com/f0ng/autoDecoder / GET_ULONG_BE

Method GET_ULONG_BE

src/com/autoDecoder/util/SM4.java:16–19  ·  view source on GitHub ↗
(byte[] b, int i)

Source from the content-addressed store, hash-verified

14 public static final int SM4_DECRYPT = 0;
15
16 private long GET_ULONG_BE(byte[] b, int i) {
17 long n = (long) (b[i] & 0xff) << 24 | (long) ((b[i + 1] & 0xff) << 16) | (long) ((b[i + 2] & 0xff) << 8) | (long) (b[i + 3] & 0xff) & 0xffffffffL;
18 return n;
19 }
20
21 private void PUT_ULONG_BE(long n, byte[] b, int i) {
22 b[i] = (byte) (int) (0xFF & n >> 24);

Callers 4

sm4LtMethod · 0.95
sm4CalciRKMethod · 0.95
sm4_setkeyMethod · 0.95
sm4_one_roundMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected