Class CasperKeyHelper


  • public class CasperKeyHelper
    extends java.lang.Object
    Key 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.Ed25519PrivateKey createRandomEd25519Key()
      Returns a private key generated using secure random
      static com.syntifi.crypto.key.Secp256k1PrivateKey createRandomSecp256k1Key()
      Returns a private key generated using secure random
      static com.syntifi.crypto.key.Ed25519PublicKey derivePublicKey​(com.syntifi.crypto.key.Ed25519PrivateKey privateKey)
      Returns a public key generated form the private key
      static com.syntifi.crypto.key.Secp256k1PublicKey derivePublicKey​(com.syntifi.crypto.key.Secp256k1PrivateKey privateKey)
      Returns a public key generated form the private key
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.IOException
        Returns 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