public final class ECDSASigner extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
ECDSASigner.ECDSASignAlgorithms |
| 构造器和说明 |
|---|
ECDSASigner() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ECPrivateKey |
decodePrivateKey(byte[] privateKey)
get ECPrivateKey from byte array
|
static ECPublicKey |
decodePublicKey(byte[] publicKey)
get ECPublicKey from byte array
|
static byte[] |
encode(ECPrivateKey key)
ECPrivateKey convert to byte array
|
static byte[] |
encode(ECPublicKey key)
ECPublicKey convert to byte array
|
static org.apache.commons.lang3.tuple.Pair<ECPublicKey,ECPrivateKey> |
generateKeyPair() |
static org.apache.commons.lang3.tuple.Pair<ECPublicKey,ECPrivateKey> |
generateKeyPair(int keySize)
密钥生成
|
static byte[] |
signSha1(byte[] data,
ECPrivateKey privateKey) |
static byte[] |
signSha256(byte[] data,
ECPrivateKey privateKey) |
static byte[] |
signSha512(byte[] data,
ECPrivateKey privateKey) |
static boolean |
verifySha1(byte[] data,
byte[] signed,
ECPublicKey publicKey) |
static boolean |
verifySha256(byte[] data,
byte[] signed,
ECPublicKey publicKey) |
static boolean |
verifySha512(byte[] data,
byte[] signed,
ECPublicKey publicKey) |
public static org.apache.commons.lang3.tuple.Pair<ECPublicKey,ECPrivateKey> generateKeyPair()
public static org.apache.commons.lang3.tuple.Pair<ECPublicKey,ECPrivateKey> generateKeyPair(int keySize)
keySize - the key size: 192/224/256/384/521/571public static byte[] encode(ECPublicKey key)
key - the ECPublicKeypublic static byte[] encode(ECPrivateKey key)
key - the ECPrivateKeypublic static ECPublicKey decodePublicKey(byte[] publicKey)
publicKey - public static ECPrivateKey decodePrivateKey(byte[] privateKey)
privateKey - public static byte[] signSha1(byte[] data,
ECPrivateKey privateKey)
public static boolean verifySha1(byte[] data,
byte[] signed,
ECPublicKey publicKey)
public static byte[] signSha256(byte[] data,
ECPrivateKey privateKey)
public static boolean verifySha256(byte[] data,
byte[] signed,
ECPublicKey publicKey)
public static byte[] signSha512(byte[] data,
ECPrivateKey privateKey)
public static boolean verifySha512(byte[] data,
byte[] signed,
ECPublicKey publicKey)
Copyright © 2023. All rights reserved.