4344454647484950515253
String resStr; // // test 1 // digest.doFinal(resBuf, 0); resStr = new String(Hex.encode(resBuf)); if (!resVec1.equals(resStr)) { return new SimpleTestResult(false,
6364656667686970717273
// byte[] bytes = Hex.decode(testVec2); digest.update(bytes, 0, bytes.length); digest.doFinal(resBuf, 0); resStr = new String(Hex.encode(resBuf)); if (!resVec2.equals(resStr)) { return new SimpleTestResult(false,
8384858687888990919293
// bytes = Hex.decode(testVec3); digest.update(bytes, 0, bytes.length); digest.doFinal(resBuf, 0); resStr = new String(Hex.encode(resBuf)); if (!resVec3.equals(resStr)) { return new SimpleTestResult(false,
103104105106107108109110111112113
// bytes = Hex.decode(testVec4); digest.update(bytes, 0, bytes.length); digest.doFinal(resBuf, 0); resStr = new String(Hex.encode(resBuf)); if (!resVec4.equals(resStr)) { return new SimpleTestResult(false,
141142143144145146147148149150151
+ System.getProperty("line.separator") + " got : " + resStr); } d.update(bytes, bytes.length/2, bytes.length - bytes.length/2); d.doFinal(resBuf, 0); resStr = new String(Hex.encode(resBuf)); if (!resVec4.equals(resStr)) { return new SimpleTestResult(false,
348349350351352353354355356357358
public byte[] calculatePublicKeyRingDigest() { final SHA512Digest dig = new SHA512Digest(); dig.reset(); dig.update(publicKeyRing, 0, publicKeyRing.length); final byte[] digest = new byte[dig.getDigestSize()]; dig.doFinal(digest, 0); return digest; } private static int convertByteToInt(byte b) { return (int) b & 0xff;