Search in sources :

Example 11 with PKCS12BagAttributeCarrierImpl

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

the class BCRSAPrivateKey method readObject.

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    if (algorithmIdentifierEnc == null) {
        algorithmIdentifierEnc = getEncoding(BCRSAPublicKey.DEFAULT_ALGORITHM_IDENTIFIER);
    }
    this.algorithmIdentifier = AlgorithmIdentifier.getInstance(algorithmIdentifierEnc);
    this.attrCarrier = new PKCS12BagAttributeCarrierImpl();
    this.rsaPrivateKey = new RSAKeyParameters(true, modulus, privateExponent);
}
Also used : PKCS12BagAttributeCarrierImpl(com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl) RSAKeyParameters(com.github.zhenwei.core.crypto.params.RSAKeyParameters)

Example 12 with PKCS12BagAttributeCarrierImpl

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

the class JCERSAPrivateKey method readObject.

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    this.modulus = (BigInteger) in.readObject();
    this.attrCarrier = new PKCS12BagAttributeCarrierImpl();
    attrCarrier.readObject(in);
    this.privateExponent = (BigInteger) in.readObject();
}
Also used : PKCS12BagAttributeCarrierImpl(com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl)

Example 13 with PKCS12BagAttributeCarrierImpl

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

the class JDKDSAPrivateKey method readObject.

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    this.x = (BigInteger) in.readObject();
    this.dsaSpec = new DSAParameterSpec((BigInteger) in.readObject(), (BigInteger) in.readObject(), (BigInteger) in.readObject());
    this.attrCarrier = new PKCS12BagAttributeCarrierImpl();
    attrCarrier.readObject(in);
}
Also used : DSAParameterSpec(java.security.spec.DSAParameterSpec) PKCS12BagAttributeCarrierImpl(com.github.zhenwei.provider.jcajce.provider.asymmetric.util.PKCS12BagAttributeCarrierImpl) BigInteger(java.math.BigInteger)

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