io.github.novacrypto.bip32.Checksum Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cwvj Show documentation
Show all versions of cwvj Show documentation
Java sdk for Dapps interact with cwv blockchain node
The newest version!
package io.github.novacrypto.bip32;
import io.github.novacrypto.hashing.Sha256;
final class Checksum {
static void confirmExtendedKeyChecksum(byte[] extendedKeyData) {
byte[] expected = checksum(extendedKeyData);
for (int i = 0; i < 4; i++) {
if (extendedKeyData[78 + i] != expected[i])
throw new BadKeySerializationException("Checksum error");
}
}
static byte[] checksum(byte[] privateKey) {
return Sha256.sha256Twice(privateKey, 0, 78);
}
}
/* Location: C:\Users\Administrator\Desktop\mnemonic-sdk-1.0.0.jar!\io\github\novacrypto\bip32\Checksum.class
* Java compiler version: 7 (51.0)
* JD-Core Version: 1.1.3
*/
© 2015 - 2025 Weber Informatics LLC | Privacy Policy