public class PublicKeyExtensions extends Object
PublicKeyExtensions.| Constructor and Description |
|---|
PublicKeyExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getKeyLength(PublicKey publicKey)
Gets the key length of the given
PublicKey. |
static String |
toBase64(PublicKey publicKey)
|
static String |
toHexString(PublicKey publicKey)
|
static String |
toHexString(PublicKey publicKey,
boolean lowerCase)
|
static void |
toPemFile(@NonNull PublicKey publicKey,
@NonNull File file)
|
static String |
toPemFormat(PublicKey publicKey)
Transform the public key in pem format.
|
public static int getKeyLength(PublicKey publicKey)
PublicKey.publicKey - the public keypublic static String toHexString(PublicKey publicKey)
publicKey - the public keyString value.public static String toBase64(PublicKey publicKey)
publicKey - the public keyString value.public static String toPemFormat(PublicKey publicKey)
publicKey - the public keypublic static String toHexString(PublicKey publicKey, boolean lowerCase)
publicKey - the public keylowerCase - the flag if the result shell be transform in lower case. If true the result isString value.public static void toPemFile(@NonNull
@NonNull PublicKey publicKey,
@NonNull
@NonNull File file)
throws IOException
publicKey - the public keyfile - the file to write inIOException - Signals that an I/O exception has occurred.Copyright © 2015–2019 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.