Class ECDSAKeyPair


  • public class ECDSAKeyPair
    extends java.lang.Object
    Key pair for ECDSA
    Author:
    Ruslan Nazirov
    • Constructor Summary

      Constructors 
      Constructor Description
      ECDSAKeyPair()
      Generate KeyPair for ECDSA
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getEncodedPrivateKey()
      Get encoded private key in string format
      java.lang.String getEncodedPublicKey()
      Get encoded public key in string format
      java.security.PrivateKey getPrivateKey()
      Get private key
      static java.security.PrivateKey getPrivateKey​(java.lang.String privateKey)
      Get private key by its string representation
      java.security.PublicKey getPublicKey()
      Get ECDSA public key
      static java.security.PublicKey getPublicKey​(java.lang.String publicKey)
      Get public key by its string representation
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ECDSAKeyPair

        public ECDSAKeyPair()
                     throws java.lang.Exception
        Generate KeyPair for ECDSA
        Throws:
        java.lang.Exception - Error during KeyPair generation
    • Method Detail

      • getPublicKey

        public java.security.PublicKey getPublicKey()
        Get ECDSA public key
        Returns:
        PublicKey Public key
      • getPublicKey

        public static java.security.PublicKey getPublicKey​(java.lang.String publicKey)
                                                    throws java.lang.Exception
        Get public key by its string representation
        Parameters:
        publicKey - Public key in string format
        Returns:
        key Public key
        Throws:
        java.lang.Exception - Error during acquiring public key
      • getEncodedPublicKey

        public java.lang.String getEncodedPublicKey()
        Get encoded public key in string format
        Returns:
        key Encoded public key in string format
      • getPrivateKey

        public java.security.PrivateKey getPrivateKey()
        Get private key
        Returns:
        privateKey Private key
      • getPrivateKey

        public static java.security.PrivateKey getPrivateKey​(java.lang.String privateKey)
                                                      throws java.lang.Exception
        Get private key by its string representation
        Parameters:
        privateKey - Private key in string format
        Returns:
        key Private key
        Throws:
        java.lang.Exception - Error during acquiring private key
      • getEncodedPrivateKey

        public java.lang.String getEncodedPrivateKey()
        Get encoded private key in string format
        Returns:
        key Encoded private key in string format