Java 类org.bouncycastle.asn1.pkcs.DHParameter 实例源码

项目:ipack    文件:JCEDHPublicKey.java   
public byte[] getEncoded()
{
    if (info != null)
    {
        return KeyUtil.getEncodedSubjectPublicKeyInfo(info);
    }

    return KeyUtil.getEncodedSubjectPublicKeyInfo(new AlgorithmIdentifier(PKCSObjectIdentifiers.dhKeyAgreement, new DHParameter(dhSpec.getP(), dhSpec.getG(), dhSpec.getL())), new DERInteger(y));
}
项目:ipack    文件:BCDHPublicKey.java   
public byte[] getEncoded()
{
    if (info != null)
    {
        return KeyUtil.getEncodedSubjectPublicKeyInfo(info);
    }

    return KeyUtil.getEncodedSubjectPublicKeyInfo(new AlgorithmIdentifier(PKCSObjectIdentifiers.dhKeyAgreement, new DHParameter(dhSpec.getP(), dhSpec.getG(), dhSpec.getL()).toASN1Primitive()), new ASN1Integer(y));
}
项目:ipack    文件:AlgorithmParametersSpi.java   
/**
 * Return the PKCS#3 ASN.1 structure DHParameter.
 * <p>
 * <pre>
 *  DHParameter ::= SEQUENCE {
 *                   prime INTEGER, -- p
 *                   base INTEGER, -- g
 *                   privateValueLength INTEGER OPTIONAL}
 * </pre>
 */
protected byte[] engineGetEncoded() 
{
    DHParameter dhP = new DHParameter(currentSpec.getP(), currentSpec.getG(), currentSpec.getL());

    try
    {
        return dhP.getEncoded(ASN1Encoding.DER);
    }
    catch (IOException e)
    {
        throw new RuntimeException("Error encoding DHParameters");
    }
}
项目:Aki-SSL    文件:JCEDHPublicKey.java   
public byte[] getEncoded()
{
    if (info != null)
    {
        return KeyUtil.getEncodedSubjectPublicKeyInfo(info);
    }

    return KeyUtil.getEncodedSubjectPublicKeyInfo(new AlgorithmIdentifier(PKCSObjectIdentifiers.dhKeyAgreement, new DHParameter(dhSpec.getP(), dhSpec.getG(), dhSpec.getL())), new ASN1Integer(y));
}
项目:Aki-SSL    文件:BCDHPublicKey.java   
public byte[] getEncoded()
{
    if (info != null)
    {
        return KeyUtil.getEncodedSubjectPublicKeyInfo(info);
    }

    return KeyUtil.getEncodedSubjectPublicKeyInfo(new AlgorithmIdentifier(PKCSObjectIdentifiers.dhKeyAgreement, new DHParameter(dhSpec.getP(), dhSpec.getG(), dhSpec.getL()).toASN1Primitive()), new ASN1Integer(y));
}
项目:Aki-SSL    文件:AlgorithmParametersSpi.java   
/**
 * Return the PKCS#3 ASN.1 structure DHParameter.
 * <p>
 * <pre>
 *  DHParameter ::= SEQUENCE {
 *                   prime INTEGER, -- p
 *                   base INTEGER, -- g
 *                   privateValueLength INTEGER OPTIONAL}
 * </pre>
 */
protected byte[] engineGetEncoded() 
{
    DHParameter dhP = new DHParameter(currentSpec.getP(), currentSpec.getG(), currentSpec.getL());

    try
    {
        return dhP.getEncoded(ASN1Encoding.DER);
    }
    catch (IOException e)
    {
        throw new RuntimeException("Error encoding DHParameters");
    }
}
项目:CryptMeme    文件:JCEDHPublicKey.java   
public byte[] getEncoded()
{
    if (info != null)
    {
        return KeyUtil.getEncodedSubjectPublicKeyInfo(info);
    }

    return KeyUtil.getEncodedSubjectPublicKeyInfo(new AlgorithmIdentifier(PKCSObjectIdentifiers.dhKeyAgreement, new DHParameter(dhSpec.getP(), dhSpec.getG(), dhSpec.getL())), new DERInteger(y));
}
项目:CryptMeme    文件:BCDHPublicKey.java   
public byte[] getEncoded()
{
    if (info != null)
    {
        return KeyUtil.getEncodedSubjectPublicKeyInfo(info);
    }

    return KeyUtil.getEncodedSubjectPublicKeyInfo(new AlgorithmIdentifier(PKCSObjectIdentifiers.dhKeyAgreement, new DHParameter(dhSpec.getP(), dhSpec.getG(), dhSpec.getL()).toASN1Primitive()), new ASN1Integer(y));
}
项目:CryptMeme    文件:AlgorithmParametersSpi.java   
/**
 * Return the PKCS#3 ASN.1 structure DHParameter.
 * <p>
 * <pre>
 *  DHParameter ::= SEQUENCE {
 *                   prime INTEGER, -- p
 *                   base INTEGER, -- g
 *                   privateValueLength INTEGER OPTIONAL}
 * </pre>
 */
protected byte[] engineGetEncoded() 
{
    DHParameter dhP = new DHParameter(currentSpec.getP(), currentSpec.getG(), currentSpec.getL());

    try
    {
        return dhP.getEncoded(ASN1Encoding.DER);
    }
    catch (IOException e)
    {
        throw new RuntimeException("Error encoding DHParameters");
    }
}
项目:irma_future_id    文件:JCEDHPublicKey.java   
public byte[] getEncoded()
{
    if (info != null)
    {
        return KeyUtil.getEncodedSubjectPublicKeyInfo(info);
    }

    return KeyUtil.getEncodedSubjectPublicKeyInfo(new AlgorithmIdentifier(PKCSObjectIdentifiers.dhKeyAgreement, new DHParameter(dhSpec.getP(), dhSpec.getG(), dhSpec.getL())), new DERInteger(y));
}
项目:irma_future_id    文件:BCDHPublicKey.java   
public byte[] getEncoded()
{
    if (info != null)
    {
        return KeyUtil.getEncodedSubjectPublicKeyInfo(info);
    }

    return KeyUtil.getEncodedSubjectPublicKeyInfo(new AlgorithmIdentifier(PKCSObjectIdentifiers.dhKeyAgreement, new DHParameter(dhSpec.getP(), dhSpec.getG(), dhSpec.getL()).toASN1Primitive()), new ASN1Integer(y));
}
项目:irma_future_id    文件:AlgorithmParametersSpi.java   
/**
 * Return the PKCS#3 ASN.1 structure DHParameter.
 * <p>
 * <pre>
 *  DHParameter ::= SEQUENCE {
 *                   prime INTEGER, -- p
 *                   base INTEGER, -- g
 *                   privateValueLength INTEGER OPTIONAL}
 * </pre>
 */
protected byte[] engineGetEncoded() 
{
    DHParameter dhP = new DHParameter(currentSpec.getP(), currentSpec.getG(), currentSpec.getL());

    try
    {
        return dhP.getEncoded(ASN1Encoding.DER);
    }
    catch (IOException e)
    {
        throw new RuntimeException("Error encoding DHParameters");
    }
}
项目:bc-java    文件:JCEDHPublicKey.java   
public byte[] getEncoded()
{
    if (info != null)
    {
        return KeyUtil.getEncodedSubjectPublicKeyInfo(info);
    }

    return KeyUtil.getEncodedSubjectPublicKeyInfo(new AlgorithmIdentifier(PKCSObjectIdentifiers.dhKeyAgreement, new DHParameter(dhSpec.getP(), dhSpec.getG(), dhSpec.getL())), new DERInteger(y));
}
项目:bc-java    文件:BCDHPublicKey.java   
public byte[] getEncoded()
{
    if (info != null)
    {
        return KeyUtil.getEncodedSubjectPublicKeyInfo(info);
    }

    return KeyUtil.getEncodedSubjectPublicKeyInfo(new AlgorithmIdentifier(PKCSObjectIdentifiers.dhKeyAgreement, new DHParameter(dhSpec.getP(), dhSpec.getG(), dhSpec.getL()).toASN1Primitive()), new ASN1Integer(y));
}
项目:bc-java    文件:AlgorithmParametersSpi.java   
/**
 * Return the PKCS#3 ASN.1 structure DHParameter.
 * <p>
 * <pre>
 *  DHParameter ::= SEQUENCE {
 *                   prime INTEGER, -- p
 *                   base INTEGER, -- g
 *                   privateValueLength INTEGER OPTIONAL}
 * </pre>
 */
protected byte[] engineGetEncoded() 
{
    DHParameter dhP = new DHParameter(currentSpec.getP(), currentSpec.getG(), currentSpec.getL());

    try
    {
        return dhP.getEncoded(ASN1Encoding.DER);
    }
    catch (IOException e)
    {
        throw new RuntimeException("Error encoding DHParameters");
    }
}