Search in sources :

Example 1 with SimpleAttributeTableGenerator

use of org.bouncycastle.cms.SimpleAttributeTableGenerator in project nhin-d by DirectProject.

the class SplitProviderDirectSignedDataGenerator method addSigner.

/**
	 * {@inheritDoc}
	 */
@Override
public void addSigner(PrivateKey key, X509Certificate cert, String digestOID, AttributeTable signedAttr, AttributeTable unsignedAttr) throws IllegalArgumentException {
    final String encOID = getEncOID(key, digestOID);
    privateSigners.add(new DirectTargetedSignerInf(key, cert, digestOID, encOID, new DefaultSignedAttributeTableGenerator(signedAttr), new SimpleAttributeTableGenerator(unsignedAttr), signedAttr));
}
Also used : SimpleAttributeTableGenerator(org.bouncycastle.cms.SimpleAttributeTableGenerator) DefaultSignedAttributeTableGenerator(org.bouncycastle.cms.DefaultSignedAttributeTableGenerator) ASN1OctetString(org.bouncycastle.asn1.ASN1OctetString) BERConstructedOctetString(org.bouncycastle.asn1.BERConstructedOctetString) DEROctetString(org.bouncycastle.asn1.DEROctetString)

Aggregations

ASN1OctetString (org.bouncycastle.asn1.ASN1OctetString)1 BERConstructedOctetString (org.bouncycastle.asn1.BERConstructedOctetString)1 DEROctetString (org.bouncycastle.asn1.DEROctetString)1 DefaultSignedAttributeTableGenerator (org.bouncycastle.cms.DefaultSignedAttributeTableGenerator)1 SimpleAttributeTableGenerator (org.bouncycastle.cms.SimpleAttributeTableGenerator)1