Package com.syntifi.near.api.rpc.service
Class KeyService
- java.lang.Object
-
- com.syntifi.near.api.rpc.service.KeyService
-
public class KeyService extends java.lang.Object
Key service provides methods to easily work with private and public keys- Since:
- 0.2.0
- Author:
- Alexandre Carvalho, Andre Bertolace
-
-
Constructor Summary
Constructors Constructor Description KeyService()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PrivateKey
deriveFromSeed(byte[] seed)
Returns a private key derived from a hierarchical deterministic keystatic PublicKey
derivePublicKey(PrivateKey privateKey)
Returns a public key generated form the private keystatic PrivateKey
deriveRandomKey()
Returns a private key generated using secure random
-
-
-
Method Detail
-
deriveFromSeed
public static PrivateKey deriveFromSeed(byte[] seed) throws java.io.IOException
Returns a private key derived from a hierarchical deterministic key- Parameters:
seed
- seed byte array- Returns:
- Private Key
- Throws:
java.io.IOException
- from crypto-keys library
-
deriveRandomKey
public static PrivateKey deriveRandomKey()
Returns a private key generated using secure random- Returns:
- private key
-
derivePublicKey
public static PublicKey derivePublicKey(PrivateKey privateKey)
Returns a public key generated form the private key- Parameters:
privateKey
- private key- Returns:
- public key
-
-