public final class CryptoMessageSyntax extends Object
| 构造器和说明 |
|---|
CryptoMessageSyntax() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
envelop(byte[] data,
X509Certificate cert,
org.bouncycastle.asn1.ASN1ObjectIdentifier alg)
构造数字信封
PKCSObjectIdentifiers#des_EDE3_CBC
PKCSObjectIdentifiers.RC2_CBC
new ASN1ObjectIdentifier("1.2.840.113549.3.2"); // RSA_RC2
new ASN1ObjectIdentifier("1.2.840.113549.3.4"); // RSA_RC4
new ASN1ObjectIdentifier("1.3.14.3.2.7"); // DES_CBC
new ASN1ObjectIdentifier("1.2.840.113549.3.7"); // DESede_CBC
new ASN1ObjectIdentifier("2.16.840.1.101.3.4.1.2"); // AES128_CBC
|
static byte[] |
sign(byte[] data,
List<PrivateKey> keys,
List<X509Certificate[]> certs)
附原文签名(多人)
|
static byte[] |
sign(byte[] data,
PrivateKey key,
X509Certificate[] certChain)
附原文签名(单人)
|
static byte[] |
unenvelop(byte[] enveloped,
X509Certificate cert,
PrivateKey privateKey)
解数字信封
|
static void |
verify(byte[] signed)
验签(附原文)
|
public static byte[] sign(byte[] data,
PrivateKey key,
X509Certificate[] certChain)
data - key - certChain - public static byte[] sign(byte[] data,
List<PrivateKey> keys,
List<X509Certificate[]> certs)
data - keys - certs - 证书链(多人list)public static void verify(byte[] signed)
signed - public static byte[] envelop(byte[] data,
X509Certificate cert,
org.bouncycastle.asn1.ASN1ObjectIdentifier alg)
data - cert - alg - public static byte[] unenvelop(byte[] enveloped,
X509Certificate cert,
PrivateKey privateKey)
enveloped - privateKey - Copyright © 2023. All rights reserved.