List of usage examples for org.bouncycastle.asn1.x509 SubjectKeyIdentifier getEncoded
public byte[] getEncoded() throws IOException
From source file:org.kse.gui.dialogs.extensions.DSelectStandardExtensionTemplate.java
License:Open Source License
private void addSubjectKeyIdentifier(X509ExtensionSet extensionSet) throws CryptoException, IOException { KeyIdentifierGenerator skiGenerator = new KeyIdentifierGenerator(subjectPublicKey); SubjectKeyIdentifier ski = new SubjectKeyIdentifier(skiGenerator.generate160BitHashId()); byte[] skiEncoded = wrapInOctetString(ski.getEncoded()); extensionSet.addExtension(X509ExtensionType.SUBJECT_KEY_IDENTIFIER.oid(), false, skiEncoded); }