private byte[] encodeDsaPublicKeyAsBitString(DSAPublicKey dsaPublicKey) throws IOException { ASN1Integer publicKey = new ASN1Integer(dsaPublicKey.getY()); return publicKey.getEncoded(ASN1Encoding.DER); } }
private byte[] encodeDsaPublicKeyAsBitString(DSAPublicKey dsaPublicKey) throws SpkacException { try { ASN1Integer publicKey = new ASN1Integer(dsaPublicKey.getY()); return publicKey.getEncoded(ASN1Encoding.DER); } catch (Exception ex) { throw new SpkacException(res.getString("NoEncodeDsaPublicKey.exception.message"), ex); } }
void encode(ASN1OutputStream out) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); if (directReference != null) { baos.write(directReference.getEncoded(ASN1Encoding.DER)); } if (indirectReference != null) { baos.write(indirectReference.getEncoded(ASN1Encoding.DER)); } if (dataValueDescriptor != null) { baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DER)); } DERTaggedObject obj = new DERTaggedObject(true, encoding, externalContent); baos.write(obj.getEncoded(ASN1Encoding.DER)); out.writeEncoded(BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray()); }
void encode(ASN1OutputStream out) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); if (directReference != null) { baos.write(directReference.getEncoded(ASN1Encoding.DL)); } if (indirectReference != null) { baos.write(indirectReference.getEncoded(ASN1Encoding.DL)); } if (dataValueDescriptor != null) { baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DL)); } DERTaggedObject obj = new DERTaggedObject(true, encoding, externalContent); baos.write(obj.getEncoded(ASN1Encoding.DL)); out.writeEncoded(BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray()); } }
void encode(ASN1OutputStream out) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); if (directReference != null) { baos.write(directReference.getEncoded(ASN1Encoding.DER)); } if (indirectReference != null) { baos.write(indirectReference.getEncoded(ASN1Encoding.DER)); } if (dataValueDescriptor != null) { baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DER)); } DERTaggedObject obj = new DERTaggedObject(true, encoding, externalContent); baos.write(obj.getEncoded(ASN1Encoding.DER)); out.writeEncoded(BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray()); } }