| 构造器和说明 |
|---|
K256KeyPair(BigInteger priv,
BigInteger pub) |
| 限定符和类型 | 方法和说明 |
|---|---|
byte[] |
canonicalPubBytes() |
String |
canonicalPubHex() |
static BigInteger |
computePrivateGen(byte[] seedBytes) |
static byte[] |
computePublicGenerator(BigInteger privateGen) |
static BigInteger |
computePublicKey(BigInteger secret) |
static byte[] |
computePublicKey(byte[] publicGenBytes,
int accountNumber) |
static BigInteger |
computeSecretKey(BigInteger privateGen,
byte[] publicGenBytes,
int accountNumber) |
static BigInteger |
generateKey(byte[] seedBytes,
Integer discriminator) |
static byte[] |
getPublic(BigInteger secretKey) |
BigInteger |
priv() |
String |
privHex() |
BigInteger |
pub() |
byte[] |
pub160Hash() |
byte[] |
signHash(byte[] bytes) |
static byte[] |
signHash(byte[] bytes,
BigInteger secret) |
byte[] |
signMessage(byte[] message) |
String |
type() |
static boolean |
verify(byte[] data,
byte[] sigBytes,
BigInteger pub) |
boolean |
verifyHash(byte[] hash,
byte[] sigBytes) |
boolean |
verifySignature(byte[] message,
byte[] sigBytes) |
public K256KeyPair(BigInteger priv, BigInteger pub)
priv - priv.pub - pub.public static byte[] getPublic(BigInteger secretKey)
secretKey - secret point on the curve as BigIntegerpublic static byte[] computePublicGenerator(BigInteger privateGen)
privateGen - secret point on the curve as BigIntegerpublic static BigInteger computePublicKey(BigInteger secret)
public static BigInteger computePrivateGen(byte[] seedBytes)
seedBytes - seedBytespublic static byte[] computePublicKey(byte[] publicGenBytes,
int accountNumber)
publicGenBytes - publicGenBytesaccountNumber - accountNumberpublic static BigInteger computeSecretKey(BigInteger privateGen, byte[] publicGenBytes, int accountNumber)
privateGen - privateGenpublicGenBytes - publicGenBytesaccountNumber - accountNumberpublic static BigInteger generateKey(byte[] seedBytes, Integer discriminator)
seedBytes - - a bytes sequence of arbitrary length which will be hasheddiscriminator - - nullable optional uint32 to hashpublic BigInteger pub()
public byte[] canonicalPubBytes()
canonicalPubBytes 在接口中 IKeyPairpublic BigInteger priv()
public boolean verifyHash(byte[] hash,
byte[] sigBytes)
public byte[] signHash(byte[] bytes)
public boolean verifySignature(byte[] message,
byte[] sigBytes)
verifySignature 在接口中 IKeyPairpublic byte[] signMessage(byte[] message)
signMessage 在接口中 IKeyPairpublic byte[] pub160Hash()
pub160Hash 在接口中 IKeyPairpublic String canonicalPubHex()
canonicalPubHex 在接口中 IKeyPairpublic static boolean verify(byte[] data,
byte[] sigBytes,
BigInteger pub)
public static byte[] signHash(byte[] bytes,
BigInteger secret)
Copyright © 2021. All rights reserved.