| Package | Description |
|---|---|
| org.aoju.bus.crypto | |
| org.aoju.bus.crypto.asymmetric |
| Modifier and Type | Method and Description |
|---|---|
static Sign |
Builder.sign(String algorithm)
创建签名算法对象
生成新的私钥公钥对
|
static Sign |
Builder.sign(String algorithm,
byte[] privateKey,
byte[] publicKey)
创建Sign算法对象
私钥和公钥同时为空时生成一对新的私钥和公钥
私钥和公钥可以单独传入一个,如此则只能使用此钥匙来做签名或验证
|
static Sign |
Builder.sign(String algorithm,
String privateKey,
String publicKey)
创建签名算法对象
私钥和公钥同时为空时生成一对新的私钥和公钥
私钥和公钥可以单独传入一个,如此则只能使用此钥匙来做签名或验证
|
| Modifier and Type | Method and Description |
|---|---|
Sign |
Sign.init(String algorithm,
PrivateKey privateKey,
PublicKey publicKey)
初始化
|
Sign |
Sign.setCertificate(Certificate certificate)
设置
Certificate 为PublicKey
如果Certificate是X509Certificate,我们需要检查是否有密钥扩展 |
Sign |
Sign.setParameter(AlgorithmParameterSpec params)
设置签名的参数
|
Sign |
Sign.setSignature(Signature signature)
设置签名
|
Copyright © 2020. All rights reserved.