Package com.casper.sdk.helper
Class CasperKeyHelper
- java.lang.Object
-
- com.casper.sdk.helper.CasperKeyHelper
-
public class CasperKeyHelper extends java.lang.ObjectKey helper provides methods to easily work with private and public keys- Since:
- 0.5.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.syntifi.crypto.key.Ed25519PrivateKeycreateRandomEd25519Key()Returns a private key generated using secure randomstatic com.syntifi.crypto.key.Secp256k1PrivateKeycreateRandomSecp256k1Key()Returns a private key generated using secure randomstatic com.syntifi.crypto.key.Ed25519PublicKeyderivePublicKey(com.syntifi.crypto.key.Ed25519PrivateKey privateKey)Returns a public key generated form the private keystatic com.syntifi.crypto.key.Secp256k1PublicKeyderivePublicKey(com.syntifi.crypto.key.Secp256k1PrivateKey privateKey)Returns a public key generated form the private key
-
-
-
Method Detail
-
createRandomEd25519Key
public static com.syntifi.crypto.key.Ed25519PrivateKey createRandomEd25519Key()
Returns a private key generated using secure random- Returns:
- private key
-
createRandomSecp256k1Key
public static com.syntifi.crypto.key.Secp256k1PrivateKey createRandomSecp256k1Key() throws java.io.IOExceptionReturns a private key generated using secure random- Returns:
- private key
- Throws:
java.io.IOException
-
derivePublicKey
public static com.syntifi.crypto.key.Ed25519PublicKey derivePublicKey(com.syntifi.crypto.key.Ed25519PrivateKey privateKey)
Returns a public key generated form the private key- Parameters:
privateKey- private key- Returns:
- public key
-
derivePublicKey
public static com.syntifi.crypto.key.Secp256k1PublicKey derivePublicKey(com.syntifi.crypto.key.Secp256k1PrivateKey privateKey)
Returns a public key generated form the private key- Parameters:
privateKey- private key- Returns:
- public key
-
-