com.license4j

## Class LicenseKeyPair

- java.lang.Object
- - com.license4j.LicenseKeyPair

-     public class LicenseKeyPair
      extends java.lang.Object

  LicenseKeyPair object keeps key pair properties, and defines algorithm data.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `KEYPAIR_ALGORITHM_DSA` DSA KeyPair algorithm
    `static java.lang.String` | `KEYPAIR_ALGORITHM_RSA` RSA KeyPair algorithm
    `static int` | `KEYSIZE_1024` 1024bit key size for use with both RSA and DSA algorithm
    `static int` | `KEYSIZE_2048` 2048bit key size for use with RSA algorithm only
    `static int` | `KEYSIZE_512` 512bit key size for use with DSA algorithm
    `static int` | `KEYSIZE_768` 768bit key size for use with DSA algorithm
    `static java.lang.String` | `SIGNATURE_ALGORITHM_SHA1withDSA` SHA1withDSA signature algorithm
    `static java.lang.String` | `SIGNATURE_ALGORITHM_SHA256withRSA` SHA256withRSA signature algorithm
    `static java.lang.String` | `SIGNATURE_ALGORITHM_SHA512withRSA` SHA512withRSA signature algorithm

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getContent()` Return key pair content as a string.
    `java.lang.String` | `getDescription()` Get key pair description.
    `java.lang.String` | `getID()` Get key pair id.
    `java.lang.String` | `getLicenseKeyKeyPairAlgorithm()` Get key pair algorithm name.
    `int` | `getLicenseKeyKeysize()` Get key pair key size.
    `java.lang.String` | `getLicenseKeySignatureAlgorithm()` Get signature algorithm name.
    `java.lang.String` | `getLicenseTextKeyPairAlgorithm()` Get key pair algorithm name.
    `int` | `getLicenseTextKeysize()` Get key pair key size.
    `java.lang.String` | `getLicenseTextSignatureAlgorithm()` Get signature algorithm name.
    `java.lang.String` | `getName()` Get key pair name.
    `java.lang.String` | `getPrivateKey()` Get private key for the key pair.
    `java.lang.String` | `getPublicKey()` Get public key for the key pair.
    `java.lang.Long` | `getTimeCreated()` Get key pair created date and time.
    `void` | `setDescription(java.lang.String value)` Set key pair description.
    `void` | `setName(java.lang.String value)` Set key pair name.
    `java.lang.String` | `toString()` Get a descriptive name for key pair.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### KEYPAIR_ALGORITHM_DSA

          public static final java.lang.String KEYPAIR_ALGORITHM_DSA

      DSA KeyPair algorithm
      See Also:
        Constant Field Values

    - #### KEYPAIR_ALGORITHM_RSA

          public static final java.lang.String KEYPAIR_ALGORITHM_RSA

      RSA KeyPair algorithm
      See Also:
        Constant Field Values

    - #### SIGNATURE_ALGORITHM_SHA1withDSA

          public static final java.lang.String SIGNATURE_ALGORITHM_SHA1withDSA

      SHA1withDSA signature algorithm
      See Also:
        Constant Field Values

    - #### SIGNATURE_ALGORITHM_SHA256withRSA

          public static final java.lang.String SIGNATURE_ALGORITHM_SHA256withRSA

      SHA256withRSA signature algorithm
      See Also:
        Constant Field Values

    - #### SIGNATURE_ALGORITHM_SHA512withRSA

          public static final java.lang.String SIGNATURE_ALGORITHM_SHA512withRSA

      SHA512withRSA signature algorithm
      See Also:
        Constant Field Values

    - #### KEYSIZE_512

          public static final int KEYSIZE_512

      512bit key size for use with DSA algorithm
      See Also:
        Constant Field Values

    - #### KEYSIZE_768

          public static final int KEYSIZE_768

      768bit key size for use with DSA algorithm
      See Also:
        Constant Field Values

    - #### KEYSIZE_1024

          public static final int KEYSIZE_1024

      1024bit key size for use with both RSA and DSA algorithm
      See Also:
        Constant Field Values

    - #### KEYSIZE_2048

          public static final int KEYSIZE_2048

      2048bit key size for use with RSA algorithm only
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getPublicKey

          public java.lang.String getPublicKey()

      Get public key for the key pair.
      Returns:
        public key as string

    - #### getPrivateKey

          public java.lang.String getPrivateKey()

      Get private key for the key pair.
      Returns:
        private key as string

    - #### setName

          public void setName(java.lang.String value)

      Set key pair name.
      Parameters:
        `value` - key pair name

    - #### setDescription

          public void setDescription(java.lang.String value)

      Set key pair description.
      Parameters:
        `value` - key pair description

    - #### getID

          public java.lang.String getID()

      Get key pair id.
      Returns:
        key pair id

    - #### getName

          public java.lang.String getName()

      Get key pair name.
      Returns:
        key pair name

    - #### getDescription

          public java.lang.String getDescription()

      Get key pair description.
      Returns:
        key pair description

    - #### getTimeCreated

          public java.lang.Long getTimeCreated()

      Get key pair created date and time.
      Returns:
        key pair created time in milliseconds

    - #### getLicenseTextKeyPairAlgorithm

          public java.lang.String getLicenseTextKeyPairAlgorithm()

      Get key pair algorithm name.
      Returns:
        key pair algorithm name

    - #### getLicenseKeyKeyPairAlgorithm

          public java.lang.String getLicenseKeyKeyPairAlgorithm()

      Get key pair algorithm name.
      Returns:
        key pair algorithm name

    - #### getLicenseTextSignatureAlgorithm

          public java.lang.String getLicenseTextSignatureAlgorithm()

      Get signature algorithm name.
      Returns:
        signature algorithm name

    - #### getLicenseKeySignatureAlgorithm

          public java.lang.String getLicenseKeySignatureAlgorithm()

      Get signature algorithm name.
      Returns:
        signature algorithm name

    - #### getLicenseTextKeysize

          public int getLicenseTextKeysize()

      Get key pair key size.
      Returns:
        key size

    - #### getLicenseKeyKeysize

          public int getLicenseKeyKeysize()

      Get key pair key size.
      Returns:
        key size

    - #### getContent

          public java.lang.String getContent()

      Return key pair content as a string. "\n" character is used as a newline.
      Returns:
        key pair content

    - #### toString

          public java.lang.String toString()

      Get a descriptive name for key pair.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        descriptive name