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

项目:ipack    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getSenderPublicKeyInfo(AlgorithmIdentifier recKeyAlgId,
    OriginatorIdentifierOrKey originator)
    throws CMSException, IOException
{
    OriginatorPublicKey opk = originator.getOriginatorKey();
    if (opk != null)
    {
        return getPublicKeyInfoFromOriginatorPublicKey(recKeyAlgId, opk);
    }

    OriginatorId origID;

    IssuerAndSerialNumber iAndSN = originator.getIssuerAndSerialNumber();
    if (iAndSN != null)
    {
        origID = new OriginatorId(iAndSN.getName(), iAndSN.getSerialNumber().getValue());
    }
    else
    {
        SubjectKeyIdentifier ski = originator.getSubjectKeyIdentifier();

        origID = new OriginatorId(ski.getKeyIdentifier());
    }

    return getPublicKeyInfoFromOriginatorId(origID);
}
项目:gwt-crypto    文件:MQVuserKeyingMaterial.java   
private MQVuserKeyingMaterial(
    ASN1Sequence seq)
{
    if (seq.size() != 1 && seq.size() != 2)
    {
        throw new IllegalArgumentException("Sequence has incorrect number of elements");
    }

    this.ephemeralPublicKey = OriginatorPublicKey.getInstance(
        seq.getObjectAt(0));

    if (seq.size() > 1)
    {
        this.addedukm = ASN1OctetString.getInstance(
            (ASN1TaggedObject)seq.getObjectAt(1), true);
    }
}
项目:gwt-crypto    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getSenderPublicKeyInfo(AlgorithmIdentifier recKeyAlgId,
    OriginatorIdentifierOrKey originator)
    throws CMSException, IOException
{
    OriginatorPublicKey opk = originator.getOriginatorKey();
    if (opk != null)
    {
        return getPublicKeyInfoFromOriginatorPublicKey(recKeyAlgId, opk);
    }

    OriginatorId origID;

    IssuerAndSerialNumber iAndSN = originator.getIssuerAndSerialNumber();
    if (iAndSN != null)
    {
        origID = new OriginatorId(iAndSN.getName(), iAndSN.getSerialNumber().getValue());
    }
    else
    {
        SubjectKeyIdentifier ski = originator.getSubjectKeyIdentifier();

        origID = new OriginatorId(ski.getKeyIdentifier());
    }

    return getPublicKeyInfoFromOriginatorId(origID);
}
项目:Aki-SSL    文件:MQVuserKeyingMaterial.java   
private MQVuserKeyingMaterial(
    ASN1Sequence seq)
{
    if (seq.size() != 1 && seq.size() != 2)
    {
        throw new IllegalArgumentException("Sequence has incorrect number of elements");
    }

    this.ephemeralPublicKey = OriginatorPublicKey.getInstance(
        seq.getObjectAt(0));

    if (seq.size() > 1)
    {
        this.addedukm = ASN1OctetString.getInstance(
            (ASN1TaggedObject)seq.getObjectAt(1), true);
    }
}
项目:Aki-SSL    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getSenderPublicKeyInfo(AlgorithmIdentifier recKeyAlgId,
    OriginatorIdentifierOrKey originator)
    throws CMSException, IOException
{
    OriginatorPublicKey opk = originator.getOriginatorKey();
    if (opk != null)
    {
        return getPublicKeyInfoFromOriginatorPublicKey(recKeyAlgId, opk);
    }

    OriginatorId origID;

    IssuerAndSerialNumber iAndSN = originator.getIssuerAndSerialNumber();
    if (iAndSN != null)
    {
        origID = new OriginatorId(iAndSN.getName(), iAndSN.getSerialNumber().getValue());
    }
    else
    {
        SubjectKeyIdentifier ski = originator.getSubjectKeyIdentifier();

        origID = new OriginatorId(ski.getKeyIdentifier());
    }

    return getPublicKeyInfoFromOriginatorId(origID);
}
项目:irma_future_id    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getSenderPublicKeyInfo(AlgorithmIdentifier recKeyAlgId,
    OriginatorIdentifierOrKey originator)
    throws CMSException, IOException
{
    OriginatorPublicKey opk = originator.getOriginatorKey();
    if (opk != null)
    {
        return getPublicKeyInfoFromOriginatorPublicKey(recKeyAlgId, opk);
    }

    OriginatorId origID;

    IssuerAndSerialNumber iAndSN = originator.getIssuerAndSerialNumber();
    if (iAndSN != null)
    {
        origID = new OriginatorId(iAndSN.getName(), iAndSN.getSerialNumber().getValue());
    }
    else
    {
        SubjectKeyIdentifier ski = originator.getSubjectKeyIdentifier();

        origID = new OriginatorId(ski.getKeyIdentifier());
    }

    return getPublicKeyInfoFromOriginatorId(origID);
}
项目:irma_future_id    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getSenderPublicKeyInfo(AlgorithmIdentifier recKeyAlgId,
    OriginatorIdentifierOrKey originator)
    throws CMSException, IOException
{
    OriginatorPublicKey opk = originator.getOriginatorKey();
    if (opk != null)
    {
        return getPublicKeyInfoFromOriginatorPublicKey(recKeyAlgId, opk);
    }

    OriginatorId origID;

    IssuerAndSerialNumber iAndSN = originator.getIssuerAndSerialNumber();
    if (iAndSN != null)
    {
        origID = new OriginatorId(iAndSN.getName(), iAndSN.getSerialNumber().getValue());
    }
    else
    {
        SubjectKeyIdentifier ski = originator.getSubjectKeyIdentifier();

        origID = new OriginatorId(ski.getKeyIdentifier());
    }

    return getPublicKeyInfoFromOriginatorId(origID);
}
项目:bc-java    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getSenderPublicKeyInfo(AlgorithmIdentifier recKeyAlgId,
    OriginatorIdentifierOrKey originator)
    throws CMSException, IOException
{
    OriginatorPublicKey opk = originator.getOriginatorKey();
    if (opk != null)
    {
        return getPublicKeyInfoFromOriginatorPublicKey(recKeyAlgId, opk);
    }

    OriginatorId origID;

    IssuerAndSerialNumber iAndSN = originator.getIssuerAndSerialNumber();
    if (iAndSN != null)
    {
        origID = new OriginatorId(iAndSN.getName(), iAndSN.getSerialNumber().getValue());
    }
    else
    {
        SubjectKeyIdentifier ski = originator.getSubjectKeyIdentifier();

        origID = new OriginatorId(ski.getKeyIdentifier());
    }

    return getPublicKeyInfoFromOriginatorId(origID);
}
项目:bc-java    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getSenderPublicKeyInfo(AlgorithmIdentifier recKeyAlgId,
    OriginatorIdentifierOrKey originator)
    throws CMSException, IOException
{
    OriginatorPublicKey opk = originator.getOriginatorKey();
    if (opk != null)
    {
        return getPublicKeyInfoFromOriginatorPublicKey(recKeyAlgId, opk);
    }

    OriginatorId origID;

    IssuerAndSerialNumber iAndSN = originator.getIssuerAndSerialNumber();
    if (iAndSN != null)
    {
        origID = new OriginatorId(iAndSN.getName(), iAndSN.getSerialNumber().getValue());
    }
    else
    {
        SubjectKeyIdentifier ski = originator.getSubjectKeyIdentifier();

        origID = new OriginatorId(ski.getKeyIdentifier());
    }

    return getPublicKeyInfoFromOriginatorId(origID);
}
项目:ipack    文件:MQVuserKeyingMaterial.java   
public MQVuserKeyingMaterial(
    OriginatorPublicKey ephemeralPublicKey,
    ASN1OctetString addedukm)
{
    // TODO Check ephemeralPublicKey not null

    this.ephemeralPublicKey = ephemeralPublicKey;
    this.addedukm = addedukm;
}
项目:ipack    文件:MQVuserKeyingMaterial.java   
private MQVuserKeyingMaterial(
    ASN1Sequence seq)
{
    // TODO Check seq has either 1 or 2 elements

    this.ephemeralPublicKey = OriginatorPublicKey.getInstance(
        seq.getObjectAt(0));

    if (seq.size() > 1)
    {
        this.addedukm = ASN1OctetString.getInstance(
            (ASN1TaggedObject)seq.getObjectAt(1), true);
    }
}
项目:ipack    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getPublicKeyInfoFromOriginatorPublicKey(AlgorithmIdentifier recKeyAlgId,
        OriginatorPublicKey originatorPublicKey)
{
    SubjectPublicKeyInfo pubInfo = new SubjectPublicKeyInfo(
        recKeyAlgId,
        originatorPublicKey.getPublicKey().getBytes());

    return pubInfo;
}
项目:gwt-crypto    文件:MQVuserKeyingMaterial.java   
public MQVuserKeyingMaterial(
    OriginatorPublicKey ephemeralPublicKey,
    ASN1OctetString addedukm)
{
    if (ephemeralPublicKey == null)
    {
        throw new IllegalArgumentException("Ephemeral public key cannot be null");
    }

    this.ephemeralPublicKey = ephemeralPublicKey;
    this.addedukm = addedukm;
}
项目:gwt-crypto    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getPublicKeyInfoFromOriginatorPublicKey(AlgorithmIdentifier recKeyAlgId,
        OriginatorPublicKey originatorPublicKey)
{
    SubjectPublicKeyInfo pubInfo = new SubjectPublicKeyInfo(
        recKeyAlgId,
        originatorPublicKey.getPublicKey().getBytes());

    return pubInfo;
}
项目:Aki-SSL    文件:MQVuserKeyingMaterial.java   
public MQVuserKeyingMaterial(
    OriginatorPublicKey ephemeralPublicKey,
    ASN1OctetString addedukm)
{
    if (ephemeralPublicKey == null)
    {
        throw new IllegalArgumentException("Ephemeral public key cannot be null");
    }

    this.ephemeralPublicKey = ephemeralPublicKey;
    this.addedukm = addedukm;
}
项目:Aki-SSL    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getPublicKeyInfoFromOriginatorPublicKey(AlgorithmIdentifier recKeyAlgId,
        OriginatorPublicKey originatorPublicKey)
{
    SubjectPublicKeyInfo pubInfo = new SubjectPublicKeyInfo(
        recKeyAlgId,
        originatorPublicKey.getPublicKey().getBytes());

    return pubInfo;
}
项目:Aki-SSL    文件:JceKeyAgreeRecipientInfoGenerator.java   
protected byte[] getUserKeyingMaterial(AlgorithmIdentifier keyAgreeAlg)
    throws CMSException
{
    init(keyAgreeAlg.getAlgorithm());

    if (ephemeralKP != null)
    {
        OriginatorPublicKey originatorPublicKey = createOriginatorPublicKey(SubjectPublicKeyInfo.getInstance(ephemeralKP.getPublic().getEncoded()));

        try
        {
            if (userKeyingMaterial != null)
            {
                return new MQVuserKeyingMaterial(originatorPublicKey, new DEROctetString(userKeyingMaterial)).getEncoded();
            }
            else
            {
                return new MQVuserKeyingMaterial(originatorPublicKey, null).getEncoded();
            }
        }
        catch (IOException e)
        {
            throw new CMSException("unable to encode user keying material: " + e.getMessage(), e);
        }
    }

    return userKeyingMaterial;
}
项目:TinyTravelTracker    文件:MQVuserKeyingMaterial.java   
public MQVuserKeyingMaterial(
    OriginatorPublicKey ephemeralPublicKey,
    ASN1OctetString addedukm)
{
    // TODO Check ephemeralPublicKey not null

    this.ephemeralPublicKey = ephemeralPublicKey;
    this.addedukm = addedukm;
}
项目:TinyTravelTracker    文件:MQVuserKeyingMaterial.java   
private MQVuserKeyingMaterial(
    ASN1Sequence seq)
{
    // TODO Check seq has either 1 or 2 elements

    this.ephemeralPublicKey = OriginatorPublicKey.getInstance(
        seq.getObjectAt(0));

    if (seq.size() > 1)
    {
        this.addedukm = ASN1OctetString.getInstance(
            (ASN1TaggedObject)seq.getObjectAt(1), true);
    }
}
项目:CryptMeme    文件:MQVuserKeyingMaterial.java   
public MQVuserKeyingMaterial(
    OriginatorPublicKey ephemeralPublicKey,
    ASN1OctetString addedukm)
{
    // TODO Check ephemeralPublicKey not null

    this.ephemeralPublicKey = ephemeralPublicKey;
    this.addedukm = addedukm;
}
项目:CryptMeme    文件:MQVuserKeyingMaterial.java   
private MQVuserKeyingMaterial(
    ASN1Sequence seq)
{
    // TODO Check seq has either 1 or 2 elements

    this.ephemeralPublicKey = OriginatorPublicKey.getInstance(
        seq.getObjectAt(0));

    if (seq.size() > 1)
    {
        this.addedukm = ASN1OctetString.getInstance(
            (ASN1TaggedObject)seq.getObjectAt(1), true);
    }
}
项目:irma_future_id    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getPublicKeyInfoFromOriginatorPublicKey(AlgorithmIdentifier recKeyAlgId,
        OriginatorPublicKey originatorPublicKey)
{
    SubjectPublicKeyInfo pubInfo = new SubjectPublicKeyInfo(
        recKeyAlgId,
        originatorPublicKey.getPublicKey().getBytes());

    return pubInfo;
}
项目:irma_future_id    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getPublicKeyInfoFromOriginatorPublicKey(AlgorithmIdentifier recKeyAlgId,
        OriginatorPublicKey originatorPublicKey)
{
    SubjectPublicKeyInfo pubInfo = new SubjectPublicKeyInfo(
        recKeyAlgId,
        originatorPublicKey.getPublicKey().getBytes());

    return pubInfo;
}
项目:irma_future_id    文件:MQVuserKeyingMaterial.java   
public MQVuserKeyingMaterial(
    OriginatorPublicKey ephemeralPublicKey,
    ASN1OctetString addedukm)
{
    // TODO Check ephemeralPublicKey not null

    this.ephemeralPublicKey = ephemeralPublicKey;
    this.addedukm = addedukm;
}
项目:irma_future_id    文件:MQVuserKeyingMaterial.java   
private MQVuserKeyingMaterial(
    ASN1Sequence seq)
{
    // TODO Check seq has either 1 or 2 elements

    this.ephemeralPublicKey = OriginatorPublicKey.getInstance(
        seq.getObjectAt(0));

    if (seq.size() > 1)
    {
        this.addedukm = ASN1OctetString.getInstance(
            (ASN1TaggedObject)seq.getObjectAt(1), true);
    }
}
项目:bc-java    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getPublicKeyInfoFromOriginatorPublicKey(AlgorithmIdentifier recKeyAlgId,
        OriginatorPublicKey originatorPublicKey)
{
    SubjectPublicKeyInfo pubInfo = new SubjectPublicKeyInfo(
        recKeyAlgId,
        originatorPublicKey.getPublicKey().getBytes());

    return pubInfo;
}
项目:bc-java    文件:KeyAgreeRecipientInformation.java   
private SubjectPublicKeyInfo getPublicKeyInfoFromOriginatorPublicKey(AlgorithmIdentifier recKeyAlgId,
        OriginatorPublicKey originatorPublicKey)
{
    SubjectPublicKeyInfo pubInfo = new SubjectPublicKeyInfo(
        recKeyAlgId,
        originatorPublicKey.getPublicKey().getBytes());

    return pubInfo;
}
项目:bc-java    文件:MQVuserKeyingMaterial.java   
public MQVuserKeyingMaterial(
    OriginatorPublicKey ephemeralPublicKey,
    ASN1OctetString addedukm)
{
    // TODO Check ephemeralPublicKey not null

    this.ephemeralPublicKey = ephemeralPublicKey;
    this.addedukm = addedukm;
}
项目:bc-java    文件:MQVuserKeyingMaterial.java   
private MQVuserKeyingMaterial(
    ASN1Sequence seq)
{
    // TODO Check seq has either 1 or 2 elements

    this.ephemeralPublicKey = OriginatorPublicKey.getInstance(
        seq.getObjectAt(0));

    if (seq.size() > 1)
    {
        this.addedukm = ASN1OctetString.getInstance(
            (ASN1TaggedObject)seq.getObjectAt(1), true);
    }
}
项目:ipack    文件:MQVuserKeyingMaterial.java   
public OriginatorPublicKey getEphemeralPublicKey()
{
    return ephemeralPublicKey;
}
项目:ipack    文件:KeyAgreeRecipientInfoGenerator.java   
protected OriginatorPublicKey createOriginatorPublicKey(SubjectPublicKeyInfo originatorKeyInfo)
{
    return new OriginatorPublicKey(
        new AlgorithmIdentifier(originatorKeyInfo.getAlgorithm().getAlgorithm(), DERNull.INSTANCE),
        originatorKeyInfo.getPublicKeyData().getBytes());
}
项目:gwt-crypto    文件:MQVuserKeyingMaterial.java   
public OriginatorPublicKey getEphemeralPublicKey()
{
    return ephemeralPublicKey;
}
项目:gwt-crypto    文件:KeyAgreeRecipientInfoGenerator.java   
protected OriginatorPublicKey createOriginatorPublicKey(SubjectPublicKeyInfo originatorKeyInfo)
{
    return new OriginatorPublicKey(
        new AlgorithmIdentifier(originatorKeyInfo.getAlgorithm().getAlgorithm(), DERNull.INSTANCE),
        originatorKeyInfo.getPublicKeyData().getBytes());
}
项目:Aki-SSL    文件:MQVuserKeyingMaterial.java   
public OriginatorPublicKey getEphemeralPublicKey()
{
    return ephemeralPublicKey;
}
项目:Aki-SSL    文件:KeyAgreeRecipientInfoGenerator.java   
protected OriginatorPublicKey createOriginatorPublicKey(SubjectPublicKeyInfo originatorKeyInfo)
{
    return new OriginatorPublicKey(
        new AlgorithmIdentifier(originatorKeyInfo.getAlgorithm().getAlgorithm(), DERNull.INSTANCE),
        originatorKeyInfo.getPublicKeyData().getBytes());
}
项目:TinyTravelTracker    文件:MQVuserKeyingMaterial.java   
public OriginatorPublicKey getEphemeralPublicKey()
{
    return ephemeralPublicKey;
}
项目:CryptMeme    文件:MQVuserKeyingMaterial.java   
public OriginatorPublicKey getEphemeralPublicKey()
{
    return ephemeralPublicKey;
}
项目:irma_future_id    文件:KeyAgreeRecipientInfoGenerator.java   
protected OriginatorPublicKey createOriginatorPublicKey(SubjectPublicKeyInfo originatorKeyInfo)
{
    return new OriginatorPublicKey(
        new AlgorithmIdentifier(originatorKeyInfo.getAlgorithm().getAlgorithm(), DERNull.INSTANCE),
        originatorKeyInfo.getPublicKeyData().getBytes());
}
项目:irma_future_id    文件:MQVuserKeyingMaterial.java   
public OriginatorPublicKey getEphemeralPublicKey()
{
    return ephemeralPublicKey;
}
项目:bc-java    文件:KeyAgreeRecipientInfoGenerator.java   
protected OriginatorPublicKey createOriginatorPublicKey(SubjectPublicKeyInfo originatorKeyInfo)
{
    return new OriginatorPublicKey(
        new AlgorithmIdentifier(originatorKeyInfo.getAlgorithm().getAlgorithm(), DERNull.INSTANCE),
        originatorKeyInfo.getPublicKeyData().getBytes());
}