Search in sources :

Example 1 with PKCS12BagAttributeCarrierImpl

use of com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl in project LinLong-Java by zhenwei1108.

the class BCDSTU4145PrivateKey method readObject.

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    byte[] enc = (byte[]) in.readObject();
    populateFromPrivKeyInfo(PrivateKeyInfo.getInstance(ASN1Primitive.fromByteArray(enc)));
    this.attrCarrier = new PKCS12BagAttributeCarrierImpl();
}
Also used : PKCS12BagAttributeCarrierImpl(com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl)

Example 2 with PKCS12BagAttributeCarrierImpl

use of com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl in project LinLong-Java by zhenwei1108.

the class BCECPrivateKey method readObject.

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    byte[] enc = (byte[]) in.readObject();
    this.configuration = WeGooProvider.CONFIGURATION;
    populateFromPrivKeyInfo(PrivateKeyInfo.getInstance(ASN1Primitive.fromByteArray(enc)));
    this.attrCarrier = new PKCS12BagAttributeCarrierImpl();
}
Also used : PKCS12BagAttributeCarrierImpl(com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl)

Example 3 with PKCS12BagAttributeCarrierImpl

use of com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl in project LinLong-Java by zhenwei1108.

the class BCECGOST3410_2012PrivateKey method readObject.

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    byte[] enc = (byte[]) in.readObject();
    populateFromPrivKeyInfo(PrivateKeyInfo.getInstance(ASN1Primitive.fromByteArray(enc)));
    this.attrCarrier = new PKCS12BagAttributeCarrierImpl();
}
Also used : PKCS12BagAttributeCarrierImpl(com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl)

Example 4 with PKCS12BagAttributeCarrierImpl

use of com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl in project LinLong-Java by zhenwei1108.

the class BCGOST3410PrivateKey method readObject.

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    String publicKeyParamSetOID = (String) in.readObject();
    if (publicKeyParamSetOID != null) {
        this.gost3410Spec = new GOST3410ParameterSpec(publicKeyParamSetOID, (String) in.readObject(), (String) in.readObject());
    } else {
        this.gost3410Spec = new GOST3410ParameterSpec(new GOST3410PublicKeyParameterSetSpec((BigInteger) in.readObject(), (BigInteger) in.readObject(), (BigInteger) in.readObject()));
        in.readObject();
        in.readObject();
    }
    this.attrCarrier = new PKCS12BagAttributeCarrierImpl();
}
Also used : PKCS12BagAttributeCarrierImpl(com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl) ASN1OctetString(com.github.zhenwei.core.asn1.ASN1OctetString) DEROctetString(com.github.zhenwei.core.asn1.DEROctetString) GOST3410ParameterSpec(com.github.zhenwei.provider.jce.spec.GOST3410ParameterSpec) GOST3410PublicKeyParameterSetSpec(com.github.zhenwei.provider.jce.spec.GOST3410PublicKeyParameterSetSpec)

Example 5 with PKCS12BagAttributeCarrierImpl

use of com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl in project LinLong-Java by zhenwei1108.

the class JCEECPrivateKey method readObject.

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    byte[] enc = (byte[]) in.readObject();
    populateFromPrivKeyInfo(PrivateKeyInfo.getInstance(ASN1Primitive.fromByteArray(enc)));
    this.algorithm = (String) in.readObject();
    this.withCompression = in.readBoolean();
    this.attrCarrier = new PKCS12BagAttributeCarrierImpl();
    attrCarrier.readObject(in);
}
Also used : PKCS12BagAttributeCarrierImpl(com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl)

Aggregations

PKCS12BagAttributeCarrierImpl (com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl)13 BigInteger (java.math.BigInteger)4 DSAParameterSpec (java.security.spec.DSAParameterSpec)2 ASN1OctetString (com.github.zhenwei.core.asn1.ASN1OctetString)1 DEROctetString (com.github.zhenwei.core.asn1.DEROctetString)1 RSAKeyParameters (com.github.zhenwei.core.crypto.params.RSAKeyParameters)1 RSAPrivateCrtKeyParameters (com.github.zhenwei.core.crypto.params.RSAPrivateCrtKeyParameters)1 ElGamalParameterSpec (com.github.zhenwei.provider.jce.spec.ElGamalParameterSpec)1 GOST3410ParameterSpec (com.github.zhenwei.provider.jce.spec.GOST3410ParameterSpec)1 GOST3410PublicKeyParameterSetSpec (com.github.zhenwei.provider.jce.spec.GOST3410PublicKeyParameterSetSpec)1 DHParameterSpec (javax.crypto.spec.DHParameterSpec)1