Class KeyGenUtil
- java.lang.Object
-
- com.bloxbean.cardano.client.crypto.KeyGenUtil
-
public class KeyGenUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description KeyGenUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static byte[]
blake2bHash224(byte[] in)
Deprecated.static byte[]
blake2bHash256(byte[] in)
Deprecated.static Keys
generateKey()
static java.lang.String
getKeyHash(@lombok.NonNull byte[] bytes)
Generate a 28 bytes hash using blake2b from key bytesstatic java.lang.String
getKeyHash(VerificationKey vkey)
Generate a 28 bytes hash using blake2b from a verification keystatic byte[]
getPublicKeyFromPrivateKey(byte[] privateKeyBytes)
static VerificationKey
getPublicKeyFromPrivateKey(SecretKey secretKey)
-
-
-
Method Detail
-
generateKey
public static Keys generateKey() throws com.bloxbean.cardano.client.exception.CborSerializationException
- Throws:
com.bloxbean.cardano.client.exception.CborSerializationException
-
getPublicKeyFromPrivateKey
public static VerificationKey getPublicKeyFromPrivateKey(SecretKey secretKey) throws com.bloxbean.cardano.client.exception.CborSerializationException
- Throws:
com.bloxbean.cardano.client.exception.CborSerializationException
-
getKeyHash
public static java.lang.String getKeyHash(VerificationKey vkey)
Generate a 28 bytes hash using blake2b from a verification key- Parameters:
vkey
-- Returns:
- hash
-
getKeyHash
public static java.lang.String getKeyHash(@NonNull @lombok.NonNull byte[] bytes)
Generate a 28 bytes hash using blake2b from key bytes- Parameters:
bytes
-- Returns:
- hash
-
getPublicKeyFromPrivateKey
public static byte[] getPublicKeyFromPrivateKey(byte[] privateKeyBytes)
-
blake2bHash224
@Deprecated public static byte[] blake2bHash224(byte[] in)
Deprecated.- Parameters:
in
-- Returns:
-
blake2bHash256
@Deprecated public static byte[] blake2bHash256(byte[] in)
Deprecated.- Parameters:
in
-- Returns:
-
-