Class 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()  
    • Constructor Detail

      • KeyService

        public KeyService()
    • 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