Class KeyPairUtil
- java.lang.Object
-
- net.ripe.rpki.commons.crypto.util.KeyPairUtil
-
public final class KeyPairUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringbase64UrlEncode(byte[] data)static StringgetAsciiHexEncodedPublicKeyHash(PublicKey publicKey)Get ASCII Hex encoded hash of the public key; for use in certificate subjects as described here: https://datatracker.ietf.org/doc/html/rfc6487#section-8static StringgetEncodedKeyIdentifier(PublicKey key)Get Base64 encoded public key as string.static byte[]getKeyIdentifier(PublicKey key)
-
-
-
Method Detail
-
getEncodedKeyIdentifier
public static String getEncodedKeyIdentifier(PublicKey key)
Get Base64 encoded public key as string. Primarily for generating filenames and transferring public keys across the wire. Strips the trailing '=' characters, which some decoders may not like!
-
getAsciiHexEncodedPublicKeyHash
public static String getAsciiHexEncodedPublicKeyHash(PublicKey publicKey)
Get ASCII Hex encoded hash of the public key; for use in certificate subjects as described here: https://datatracker.ietf.org/doc/html/rfc6487#section-8
-
getKeyIdentifier
public static byte[] getKeyIdentifier(PublicKey key)
-
base64UrlEncode
public static String base64UrlEncode(byte[] data)
-
-