Java 类org.bouncycastle.asn1.cms.KEKRecipientInfo 实例源码

项目:ipack    文件:CMSEnvelopedHelper.java   
private static void readRecipientInfo(
    List infos, RecipientInfo info, AlgorithmIdentifier messageAlgorithm, CMSSecureReadable secureReadable, AuthAttributesProvider additionalData)
{
    ASN1Encodable recipInfo = info.getInfo();
    if (recipInfo instanceof KeyTransRecipientInfo)
    {
        infos.add(new KeyTransRecipientInformation(
            (KeyTransRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KEKRecipientInfo)
    {
        infos.add(new KEKRecipientInformation(
            (KEKRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KeyAgreeRecipientInfo)
    {
        KeyAgreeRecipientInformation.readRecipientInfo(infos,
            (KeyAgreeRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData);
    }
    else if (recipInfo instanceof PasswordRecipientInfo)
    {
        infos.add(new PasswordRecipientInformation(
            (PasswordRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
}
项目:gwt-crypto    文件:CMSEnvelopedHelper.java   
private static void readRecipientInfo(
    List infos, RecipientInfo info, AlgorithmIdentifier messageAlgorithm, CMSSecureReadable secureReadable, AuthAttributesProvider additionalData)
{
    ASN1Encodable recipInfo = info.getInfo();
    if (recipInfo instanceof KeyTransRecipientInfo)
    {
        infos.add(new KeyTransRecipientInformation(
            (KeyTransRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KEKRecipientInfo)
    {
        infos.add(new KEKRecipientInformation(
            (KEKRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KeyAgreeRecipientInfo)
    {
        KeyAgreeRecipientInformation.readRecipientInfo(infos,
            (KeyAgreeRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData);
    }
    else if (recipInfo instanceof PasswordRecipientInfo)
    {
        infos.add(new PasswordRecipientInformation(
            (PasswordRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
}
项目:Aki-SSL    文件:CMSEnvelopedHelper.java   
private static void readRecipientInfo(
    List infos, RecipientInfo info, AlgorithmIdentifier messageAlgorithm, CMSSecureReadable secureReadable, AuthAttributesProvider additionalData)
{
    ASN1Encodable recipInfo = info.getInfo();
    if (recipInfo instanceof KeyTransRecipientInfo)
    {
        infos.add(new KeyTransRecipientInformation(
            (KeyTransRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KEKRecipientInfo)
    {
        infos.add(new KEKRecipientInformation(
            (KEKRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KeyAgreeRecipientInfo)
    {
        KeyAgreeRecipientInformation.readRecipientInfo(infos,
            (KeyAgreeRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData);
    }
    else if (recipInfo instanceof PasswordRecipientInfo)
    {
        infos.add(new PasswordRecipientInformation(
            (PasswordRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
}
项目:irma_future_id    文件:CMSEnvelopedHelper.java   
private static void readRecipientInfo(
    List infos, RecipientInfo info, AlgorithmIdentifier messageAlgorithm, CMSSecureReadable secureReadable, AuthAttributesProvider additionalData)
{
    ASN1Encodable recipInfo = info.getInfo();
    if (recipInfo instanceof KeyTransRecipientInfo)
    {
        infos.add(new KeyTransRecipientInformation(
            (KeyTransRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KEKRecipientInfo)
    {
        infos.add(new KEKRecipientInformation(
            (KEKRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KeyAgreeRecipientInfo)
    {
        KeyAgreeRecipientInformation.readRecipientInfo(infos,
            (KeyAgreeRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData);
    }
    else if (recipInfo instanceof PasswordRecipientInfo)
    {
        infos.add(new PasswordRecipientInformation(
            (PasswordRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
}
项目:irma_future_id    文件:CMSEnvelopedHelper.java   
private static void readRecipientInfo(
    List infos, RecipientInfo info, AlgorithmIdentifier messageAlgorithm, CMSSecureReadable secureReadable, AuthAttributesProvider additionalData)
{
    ASN1Encodable recipInfo = info.getInfo();
    if (recipInfo instanceof KeyTransRecipientInfo)
    {
        infos.add(new KeyTransRecipientInformation(
            (KeyTransRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KEKRecipientInfo)
    {
        infos.add(new KEKRecipientInformation(
            (KEKRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KeyAgreeRecipientInfo)
    {
        KeyAgreeRecipientInformation.readRecipientInfo(infos,
            (KeyAgreeRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData);
    }
    else if (recipInfo instanceof PasswordRecipientInfo)
    {
        infos.add(new PasswordRecipientInformation(
            (PasswordRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
}
项目:irma_future_id    文件:CMSEnvelopedHelper.java   
private static void readRecipientInfo(
    List infos, RecipientInfo info, AlgorithmIdentifier messageAlgorithm, CMSSecureReadable secureReadable, AuthAttributesProvider additionalData)
{
    ASN1Encodable recipInfo = info.getInfo();
    if (recipInfo instanceof KeyTransRecipientInfo)
    {
        infos.add(new KeyTransRecipientInformation(
            (KeyTransRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KEKRecipientInfo)
    {
        infos.add(new KEKRecipientInformation(
            (KEKRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KeyAgreeRecipientInfo)
    {
        KeyAgreeRecipientInformation.readRecipientInfo(infos,
            (KeyAgreeRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData);
    }
    else if (recipInfo instanceof PasswordRecipientInfo)
    {
        infos.add(new PasswordRecipientInformation(
            (PasswordRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
}
项目:irma_future_id    文件:CMSEnvelopedHelper.java   
private static void readRecipientInfo(
    List infos, RecipientInfo info, AlgorithmIdentifier messageAlgorithm, CMSSecureReadable secureReadable, AuthAttributesProvider additionalData)
{
    ASN1Encodable recipInfo = info.getInfo();
    if (recipInfo instanceof KeyTransRecipientInfo)
    {
        infos.add(new KeyTransRecipientInformation(
            (KeyTransRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KEKRecipientInfo)
    {
        infos.add(new KEKRecipientInformation(
            (KEKRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KeyAgreeRecipientInfo)
    {
        KeyAgreeRecipientInformation.readRecipientInfo(infos,
            (KeyAgreeRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData);
    }
    else if (recipInfo instanceof PasswordRecipientInfo)
    {
        infos.add(new PasswordRecipientInformation(
            (PasswordRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
}
项目:bc-java    文件:CMSEnvelopedHelper.java   
private static void readRecipientInfo(
    List infos, RecipientInfo info, AlgorithmIdentifier messageAlgorithm, CMSSecureReadable secureReadable, AuthAttributesProvider additionalData)
{
    ASN1Encodable recipInfo = info.getInfo();
    if (recipInfo instanceof KeyTransRecipientInfo)
    {
        infos.add(new KeyTransRecipientInformation(
            (KeyTransRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KEKRecipientInfo)
    {
        infos.add(new KEKRecipientInformation(
            (KEKRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KeyAgreeRecipientInfo)
    {
        KeyAgreeRecipientInformation.readRecipientInfo(infos,
            (KeyAgreeRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData);
    }
    else if (recipInfo instanceof PasswordRecipientInfo)
    {
        infos.add(new PasswordRecipientInformation(
            (PasswordRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
}
项目:bc-java    文件:CMSEnvelopedHelper.java   
private static void readRecipientInfo(
    List infos, RecipientInfo info, AlgorithmIdentifier messageAlgorithm, CMSSecureReadable secureReadable, AuthAttributesProvider additionalData)
{
    ASN1Encodable recipInfo = info.getInfo();
    if (recipInfo instanceof KeyTransRecipientInfo)
    {
        infos.add(new KeyTransRecipientInformation(
            (KeyTransRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KEKRecipientInfo)
    {
        infos.add(new KEKRecipientInformation(
            (KEKRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KeyAgreeRecipientInfo)
    {
        KeyAgreeRecipientInformation.readRecipientInfo(infos,
            (KeyAgreeRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData);
    }
    else if (recipInfo instanceof PasswordRecipientInfo)
    {
        infos.add(new PasswordRecipientInformation(
            (PasswordRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
}
项目:bc-java    文件:CMSEnvelopedHelper.java   
private static void readRecipientInfo(
    List infos, RecipientInfo info, AlgorithmIdentifier messageAlgorithm, CMSSecureReadable secureReadable, AuthAttributesProvider additionalData)
{
    ASN1Encodable recipInfo = info.getInfo();
    if (recipInfo instanceof KeyTransRecipientInfo)
    {
        infos.add(new KeyTransRecipientInformation(
            (KeyTransRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KEKRecipientInfo)
    {
        infos.add(new KEKRecipientInformation(
            (KEKRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KeyAgreeRecipientInfo)
    {
        KeyAgreeRecipientInformation.readRecipientInfo(infos,
            (KeyAgreeRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData);
    }
    else if (recipInfo instanceof PasswordRecipientInfo)
    {
        infos.add(new PasswordRecipientInformation(
            (PasswordRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
}
项目:bc-java    文件:CMSEnvelopedHelper.java   
private static void readRecipientInfo(
    List infos, RecipientInfo info, AlgorithmIdentifier messageAlgorithm, CMSSecureReadable secureReadable, AuthAttributesProvider additionalData)
{
    ASN1Encodable recipInfo = info.getInfo();
    if (recipInfo instanceof KeyTransRecipientInfo)
    {
        infos.add(new KeyTransRecipientInformation(
            (KeyTransRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KEKRecipientInfo)
    {
        infos.add(new KEKRecipientInformation(
            (KEKRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
    else if (recipInfo instanceof KeyAgreeRecipientInfo)
    {
        KeyAgreeRecipientInformation.readRecipientInfo(infos,
            (KeyAgreeRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData);
    }
    else if (recipInfo instanceof PasswordRecipientInfo)
    {
        infos.add(new PasswordRecipientInformation(
            (PasswordRecipientInfo)recipInfo, messageAlgorithm, secureReadable, additionalData));
    }
}
项目:ipack    文件:KEKRecipientInfoGenerator.java   
public final RecipientInfo generate(GenericKey contentEncryptionKey)
    throws CMSException
{
    try
    {
        ASN1OctetString encryptedKey = new DEROctetString(wrapper.generateWrappedKey(contentEncryptionKey));

        return new RecipientInfo(new KEKRecipientInfo(kekIdentifier, wrapper.getAlgorithmIdentifier(), encryptedKey));
    }
    catch (OperatorException e)
    {
        throw new CMSException("exception wrapping content key: " + e.getMessage(), e);
    }
}
项目:ipack    文件:KEKRecipientInformation.java   
KEKRecipientInformation(
    KEKRecipientInfo        info,
    AlgorithmIdentifier     messageAlgorithm,
    CMSSecureReadable       secureReadable,
    AuthAttributesProvider  additionalData)
{
    super(info.getKeyEncryptionAlgorithm(), messageAlgorithm, secureReadable, additionalData);

    this.info = info;

    KEKIdentifier kekId = info.getKekid();

    this.rid = new KEKRecipientId(kekId.getKeyIdentifier().getOctets());
}
项目:gwt-crypto    文件:KEKRecipientInfoGenerator.java   
public final RecipientInfo generate(GenericKey contentEncryptionKey)
    throws CMSException
{
    try
    {
        ASN1OctetString encryptedKey = new DEROctetString(wrapper.generateWrappedKey(contentEncryptionKey));

        return new RecipientInfo(new KEKRecipientInfo(kekIdentifier, wrapper.getAlgorithmIdentifier(), encryptedKey));
    }
    catch (OperatorException e)
    {
        throw new CMSException("exception wrapping content key: " + e.getMessage(), e);
    }
}
项目:gwt-crypto    文件:KEKRecipientInformation.java   
KEKRecipientInformation(
    KEKRecipientInfo        info,
    AlgorithmIdentifier     messageAlgorithm,
    CMSSecureReadable       secureReadable,
    AuthAttributesProvider  additionalData)
{
    super(info.getKeyEncryptionAlgorithm(), messageAlgorithm, secureReadable, additionalData);

    this.info = info;

    KEKIdentifier kekId = info.getKekid();

    this.rid = new KEKRecipientId(kekId.getKeyIdentifier().getOctets());
}
项目:Aki-SSL    文件:KEKRecipientInfoGenerator.java   
public final RecipientInfo generate(GenericKey contentEncryptionKey)
    throws CMSException
{
    try
    {
        ASN1OctetString encryptedKey = new DEROctetString(wrapper.generateWrappedKey(contentEncryptionKey));

        return new RecipientInfo(new KEKRecipientInfo(kekIdentifier, wrapper.getAlgorithmIdentifier(), encryptedKey));
    }
    catch (OperatorException e)
    {
        throw new CMSException("exception wrapping content key: " + e.getMessage(), e);
    }
}
项目:Aki-SSL    文件:KEKRecipientInformation.java   
KEKRecipientInformation(
    KEKRecipientInfo        info,
    AlgorithmIdentifier     messageAlgorithm,
    CMSSecureReadable       secureReadable,
    AuthAttributesProvider  additionalData)
{
    super(info.getKeyEncryptionAlgorithm(), messageAlgorithm, secureReadable, additionalData);

    this.info = info;

    KEKIdentifier kekId = info.getKekid();

    this.rid = new KEKRecipientId(kekId.getKeyIdentifier().getOctets());
}
项目:irma_future_id    文件:KEKRecipientInformation.java   
KEKRecipientInformation(
    KEKRecipientInfo        info,
    AlgorithmIdentifier     messageAlgorithm,
    CMSSecureReadable       secureReadable,
    AuthAttributesProvider  additionalData)
{
    super(info.getKeyEncryptionAlgorithm(), messageAlgorithm, secureReadable, additionalData);

    this.info = info;

    KEKIdentifier kekId = info.getKekid();

    this.rid = new KEKRecipientId(kekId.getKeyIdentifier().getOctets());
}
项目:irma_future_id    文件:KEKRecipientInfoGenerator.java   
public final RecipientInfo generate(GenericKey contentEncryptionKey)
    throws CMSException
{
    try
    {
        ASN1OctetString encryptedKey = new DEROctetString(wrapper.generateWrappedKey(contentEncryptionKey));

        return new RecipientInfo(new KEKRecipientInfo(kekIdentifier, wrapper.getAlgorithmIdentifier(), encryptedKey));
    }
    catch (OperatorException e)
    {
        throw new CMSException("exception wrapping content key: " + e.getMessage(), e);
    }
}
项目:irma_future_id    文件:KEKRecipientInformation.java   
KEKRecipientInformation(
    KEKRecipientInfo        info,
    AlgorithmIdentifier     messageAlgorithm,
    CMSSecureReadable       secureReadable,
    AuthAttributesProvider  additionalData)
{
    super(info.getKeyEncryptionAlgorithm(), messageAlgorithm, secureReadable, additionalData);

    this.info = info;

    KEKIdentifier kekId = info.getKekid();

    this.rid = new KEKRecipientId(kekId.getKeyIdentifier().getOctets());
}
项目:bc-java    文件:KEKRecipientInformation.java   
KEKRecipientInformation(
    KEKRecipientInfo        info,
    AlgorithmIdentifier     messageAlgorithm,
    CMSSecureReadable       secureReadable,
    AuthAttributesProvider  additionalData)
{
    super(info.getKeyEncryptionAlgorithm(), messageAlgorithm, secureReadable, additionalData);

    this.info = info;

    KEKIdentifier kekId = info.getKekid();

    this.rid = new KEKRecipientId(kekId.getKeyIdentifier().getOctets());
}
项目:bc-java    文件:KEKRecipientInfoGenerator.java   
public final RecipientInfo generate(GenericKey contentEncryptionKey)
    throws CMSException
{
    try
    {
        ASN1OctetString encryptedKey = new DEROctetString(wrapper.generateWrappedKey(contentEncryptionKey));

        return new RecipientInfo(new KEKRecipientInfo(kekIdentifier, wrapper.getAlgorithmIdentifier(), encryptedKey));
    }
    catch (OperatorException e)
    {
        throw new CMSException("exception wrapping content key: " + e.getMessage(), e);
    }
}
项目:bc-java    文件:KEKRecipientInformation.java   
KEKRecipientInformation(
    KEKRecipientInfo        info,
    AlgorithmIdentifier     messageAlgorithm,
    CMSSecureReadable       secureReadable,
    AuthAttributesProvider  additionalData)
{
    super(info.getKeyEncryptionAlgorithm(), messageAlgorithm, secureReadable, additionalData);

    this.info = info;

    KEKIdentifier kekId = info.getKekid();

    this.rid = new KEKRecipientId(kekId.getKeyIdentifier().getOctets());
}