public class CMSVistaEnvelopedData
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
CMSVistaEnvelopedData.RecipientInfoGamma |
Modifier and Type | Field and Description |
---|---|
private byte[] |
content |
private X509Name |
dnSenderIssuer |
(package private) GammaGOST28147 |
enc |
(package private) java.security.cert.X509Certificate |
exchSenderCert |
private X509Name |
exchSenderName |
private byte[] |
exchSenderSn |
private static byte[] |
h1 |
private java.util.List |
recipientInfos |
private java.util.List<X509Name> |
recipientsNames |
(package private) java.security.PrivateKey |
senderKey |
private ASN1EncodableVector |
unAttr |
private AttributeTable |
unAttrTable |
private int |
version |
Constructor and Description |
---|
CMSVistaEnvelopedData() |
CMSVistaEnvelopedData(byte[] cmsDevelopedBuf)
Чтение зашифрованного пакета.
|
Modifier and Type | Method and Description |
---|---|
void |
addKeyRecipient(java.security.cert.X509Certificate recipientCert)
Добавление получателя сообщения.
|
void |
addUnprotectedAttrs(Attribute attr)
Добавление не защищенных аттрибутов сообщения.
|
byte[] |
cryptText(byte[] buf)
Шифрование сообщения
|
byte[] |
decryptText(java.security.KeyStore store,
java.lang.String password,
byte[] crpData,
java.security.cert.X509Certificate exchSenderCert)
Расшифровывание сообщения
|
EnvelopedData |
generateEnvelopedData(java.security.cert.X509Certificate cert,
boolean isInclude)
Формирование шифрованного сообщения Enveloped CMS.
|
void |
genSessionKey(JCEECPrivateKey privKey) |
DERObject |
getAttributeByOid(AttributeTable attributeTable,
java.lang.String oid)
Получение атрибута
|
java.security.cert.X509Certificate |
getExchSenderCert() |
X509Name |
getExchSenderName() |
byte[] |
getExchSenderSn() |
java.util.List |
getRecipientInfos() |
java.util.List<X509Name> |
getRecipientsNames() |
java.util.List |
getRecipientsSerialNumbers() |
ASN1EncodableVector |
getUnAttr() |
void |
initDHParameter(java.security.PrivateKey key) |
private java.util.List recipientInfos
private ASN1EncodableVector unAttr
private AttributeTable unAttrTable
private int version
private X509Name dnSenderIssuer
private byte[] exchSenderSn
private X509Name exchSenderName
java.security.cert.X509Certificate exchSenderCert
java.security.PrivateKey senderKey
private java.util.List<X509Name> recipientsNames
private byte[] content
private static byte[] h1
GammaGOST28147 enc
public CMSVistaEnvelopedData()
public CMSVistaEnvelopedData(byte[] cmsDevelopedBuf) throws java.io.IOException, java.security.NoSuchProviderException, java.security.cert.CertificateException, CMSException, java.security.NoSuchAlgorithmException
cmsDevelopedBuf
- зашифрованный пакетjava.io.IOException
java.security.NoSuchProviderException
java.security.cert.CertificateException
CMSException
java.security.NoSuchAlgorithmException
public EnvelopedData generateEnvelopedData(java.security.cert.X509Certificate cert, boolean isInclude) throws java.security.cert.CertificateEncodingException, java.io.IOException
cert
- Сертификат отправителя шифрованного сообщенияjava.security.cert.CertificateEncodingException
java.io.IOException
public void addKeyRecipient(java.security.cert.X509Certificate recipientCert)
recipientCert
- Сертификат получателя шифрованного сообщенияpublic void addUnprotectedAttrs(Attribute attr)
attr
- аттрибутpublic DERObject getAttributeByOid(AttributeTable attributeTable, java.lang.String oid)
oid
- OID
Возможные варианты:
public byte[] cryptText(byte[] buf)
buf
- текст сообщения который необходимо зашифроватьpublic void genSessionKey(JCEECPrivateKey privKey)
public byte[] decryptText(java.security.KeyStore store, java.lang.String password, byte[] crpData, java.security.cert.X509Certificate exchSenderCert)
store
- хранилище закрытого ключа получателя сообщенияpassword
- Пароль для доступа к ключевому контейнеруpublic java.security.cert.X509Certificate getExchSenderCert()
public ASN1EncodableVector getUnAttr()
public void initDHParameter(java.security.PrivateKey key)
public java.util.List getRecipientInfos()
public java.util.List getRecipientsSerialNumbers()
public java.util.List<X509Name> getRecipientsNames()
public byte[] getExchSenderSn()
public X509Name getExchSenderName()
Copyright © 1998-2014 Gamma Technologies. All Rights Reserved.