/** * Basic constructor. * * @param usage - the bitwise OR of the Key Usage flags giving the * allowed uses for the key. * e.g. (KeyUsage.keyEncipherment | KeyUsage.dataEncipherment) */ public KeyUsage( int usage) { this.bitString = new DERBitString(usage); }
public SubjectPublicKeyInfo( AlgorithmIdentifier algId, byte[] publicKey) { this.keyData = new DERBitString(publicKey); this.algId = algId; }
public SubjectPublicKeyInfo( AlgorithmIdentifier algId, byte[] publicKey) { this.keyData = new DERBitString(publicKey); this.algId = algId; }
public SubjectPublicKeyInfo( AlgorithmIdentifier algId, ASN1Encodable publicKey) { this.keyData = new DERBitString(publicKey); this.algId = algId; }
public OriginatorPublicKey( AlgorithmIdentifier algorithm, byte[] publicKey) { this.algorithm = algorithm; this.publicKey = new DERBitString(publicKey); }
public SubjectPublicKeyInfo( AlgorithmIdentifier algId, ASN1Encodable publicKey) throws IOException { this.keyData = new DERBitString(publicKey); this.algId = algId; }
public OriginatorPublicKey( AlgorithmIdentifier algorithm, byte[] publicKey) { this.algorithm = algorithm; this.publicKey = new DERBitString(publicKey); }
ASN1Primitive toDERObject() { return new DERBitString(data, padBits); }
public ValidationParams(byte[] seed, int pgenCounter) { if (seed == null) { throw new IllegalArgumentException("'seed' cannot be null"); } this.seed = new DERBitString(seed); this.pgenCounter = new ASN1Integer(pgenCounter); }
ASN1EncodableVector v = new ASN1EncodableVector(); v.add(csrInfo); ASN1ObjectIdentifier oid = new ASN1ObjectIdentifier("0.0"); v.add(new DERSequence(oid)); v.add(new DERBitString(new byte[] {})); byte[] encoded = new DERSequence(v).getEncoded(); byte[] PKCS10= DataSignGeneration(encoded);
private X509Certificate generateJcaObject(TBSCertificate tbsCert, byte[] signature) throws Exception { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(tbsCert); v.add(sigAlgId); v.add(new DERBitString(signature)); return (X509Certificate)certificateFactory.engineGenerateCertificate( new ByteArrayInputStream(new DERSequence(v).getEncoded(ASN1Encoding.DER))); }
private static CertificateList generateCRLStructure(TBSCertList tbsCertList, AlgorithmIdentifier sigAlgId, byte[] signature) { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(tbsCertList); v.add(sigAlgId); v.add(new DERBitString(signature)); return CertificateList.getInstance(new DERSequence(v)); }
private static Certificate generateStructure(TBSCertificate tbsCert, AlgorithmIdentifier sigAlgId, byte[] signature) { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(tbsCert); v.add(sigAlgId); v.add(new DERBitString(signature)); return Certificate.getInstance(new DERSequence(v)); }
private static Certificate generateStructure(TBSCertificate tbsCert, AlgorithmIdentifier sigAlgId, byte[] signature) { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(tbsCert); v.add(sigAlgId); v.add(new DERBitString(signature)); return Certificate.getInstance(new DERSequence(v)); }
private static AttributeCertificate generateAttrStructure(AttributeCertificateInfo attrInfo, AlgorithmIdentifier sigAlgId, byte[] signature) { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(attrInfo); v.add(sigAlgId); v.add(new DERBitString(signature)); return AttributeCertificate.getInstance(new DERSequence(v)); }
private static AttributeCertificate generateAttrStructure(AttributeCertificateInfo attrInfo, AlgorithmIdentifier sigAlgId, byte[] signature) { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(attrInfo); v.add(sigAlgId); v.add(new DERBitString(signature)); return AttributeCertificate.getInstance(new DERSequence(v)); }
private static CertificateList generateCRLStructure(TBSCertList tbsCertList, AlgorithmIdentifier sigAlgId, byte[] signature) { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(tbsCertList); v.add(sigAlgId); v.add(new DERBitString(signature)); return CertificateList.getInstance(new DERSequence(v)); }
private X509Certificate generateJcaObject(TBSCertificate tbsCert, byte[] signature) throws CertificateParsingException { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(tbsCert); v.add(sigAlgId); v.add(new DERBitString(signature)); return new X509CertificateObject(new X509CertificateStructure(new DERSequence(v))); }
private X509CRL generateJcaObject(TBSCertList tbsCrl, byte[] signature) throws CRLException { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(tbsCrl); v.add(sigAlgId); v.add(new DERBitString(signature)); return new X509CRLObject(new CertificateList(new DERSequence(v))); }
private X509CRL generateJcaObject(TBSCertList tbsCrl, byte[] signature) throws CRLException { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(tbsCrl); v.add(sigAlgId); v.add(new DERBitString(signature)); return new X509CRLObject(new CertificateList(new DERSequence(v))); }