MCPcopy Create free account
hub / github.com/SeanDragon/protools / long2bytes

Method long2bytes

security/src/main/java/pro/tools/security/sm/SM3.java:87–93  ·  view source on GitHub ↗
(long l)

Source from the content-addressed store, hash-verified

85 }
86
87 private static byte[] long2bytes(long l) {
88 byte[] bytes = new byte[8];
89 for (int i = 0; i < 8; i++) {
90 bytes[i] = (byte) (l >>> ((7 - i) * 8));
91 }
92 return bytes;
93 }
94
95 static byte[] hash(byte[] source) throws IOException {
96 byte[] m1 = padding(source);

Callers 1

paddingMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected