public void encode ( DerOutputStream out ) throws IOException { DerOutputStream tmp = new DerOutputStream ( ) ; hashAlgId . encode ( tmp ) ; tmp . putOctetString ( issuerNameHash ) ; tmp . putOctetString ( issuerKeyHash ) ; certSerialNumber . encode ( tmp ) ; out . write ( DerValue . tag_Sequence , tmp ) ; if ( debug ) { HexDumpEncoder encoder = new HexDumpEncoder ( ) ; System . out . println ( "Encoded certId is " + encoder . encode ( out . toByteArray ( ) ) ) ; } }
Encode the CertId using ASN . 1 DER . The hash algorithm used is SHA - 1 .