public class KeyUtils
extends java.lang.Object
| Constructor and Description |
|---|
KeyUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
compressPublicKey(byte[] notCompressedPubKey)
Transforms the given public key into its compressed format if not already compressed.
|
static boolean |
isPublicKeyCompressed(byte[] publicKey)
Checks if the given public key is in compressed format.
|
static byte[] |
privateKeyIntegerToByteArray(java.math.BigInteger privateKey) |
static byte[] |
publicKeyIntegerToByteArray(java.math.BigInteger publicKey) |
public static byte[] publicKeyIntegerToByteArray(java.math.BigInteger publicKey)
public static byte[] privateKeyIntegerToByteArray(java.math.BigInteger privateKey)
public static byte[] compressPublicKey(byte[] notCompressedPubKey)
The given public key must be encoded as defined in section 2.3.3 of SEC1.
notCompressedPubKey - the uncompressed public keypublic static boolean isPublicKeyCompressed(byte[] publicKey)
The given public key must be byte-encoded as defined in section 2.3.3 of SEC1.
publicKey - the public key to check