public void putPubKeyIntoBuffer(PublicKey pk, Buffer<?> buf) { writePubKeyContentsIntoBuffer(pk, buf.putString(sType)); }
static void writePubKeyContentsIntoBuffer(PublicKey publicKey, KeyType innerKeyType, Buffer<?> buf) { Certificate<PublicKey> certificate = toCertificate(publicKey); buf.putBytes(certificate.getNonce()); innerKeyType.writePubKeyContentsIntoBuffer(certificate.getKey(), buf); buf.putUInt64(certificate.getSerial()) .putUInt32(certificate.getType()) .putString(certificate.getId()) .putBytes(packList(certificate.getValidPrincipals())) .putUInt64(epochFromDate(certificate.getValidAfter())) .putUInt64(epochFromDate(certificate.getValidBefore())) .putBytes(packMap(certificate.getCritOptions())) .putBytes(packMap(certificate.getExtensions())) .putString("") // reserved .putBytes(certificate.getSignatureKey()) .putBytes(certificate.getSignature()); }
public void putPubKeyIntoBuffer(PublicKey pk, Buffer<?> buf) { writePubKeyContentsIntoBuffer(pk, buf.putString(sType)); }
static void writePubKeyContentsIntoBuffer(PublicKey publicKey, KeyType innerKeyType, Buffer<?> buf) { Certificate<PublicKey> certificate = toCertificate(publicKey); buf.putBytes(certificate.getNonce()); innerKeyType.writePubKeyContentsIntoBuffer(certificate.getKey(), buf); buf.putUInt64(certificate.getSerial()) .putUInt32(certificate.getType()) .putString(certificate.getId()) .putBytes(packList(certificate.getValidPrincipals())) .putUInt64(epochFromDate(certificate.getValidAfter())) .putUInt64(epochFromDate(certificate.getValidBefore())) .putBytes(packMap(certificate.getCritOptions())) .putBytes(packMap(certificate.getExtensions())) .putString("") // reserved .putBytes(certificate.getSignatureKey()) .putBytes(certificate.getSignature()); }