Package org.bgerp.app.dist.lic

# Class Sign

java.lang.Object
org.bgerp.app.dist.lic.Sign

public class Sign extends Object
Signer supported SSH keys: 'RSA', 'ED25519'

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Sign(String id, String privateKey, String password)`
  Constructor for sign generation.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `signatureGenerate(byte[] data)`
  Makes a signature.
  `boolean`
  `signatureVerify(byte[] data, String signature)`
  Verification of signature.

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Sign

    public Sign(String id, String privateKey, String password)
    Constructor for sign generation.
    Parameters:
      `id` - unique key ID.
      `privateKey` - encoded private key.
      `password` - for decrypting the private key, or null.

- ## Method Details

  - ### signatureVerify

    public boolean signatureVerify(byte[] data, String signature)
    Verification of signature.
    Parameters:
      `data` - raw data.
      `signature` - Base64 encoded signature.
    Returns:

  - ### signatureGenerate

    public String signatureGenerate(byte[] data) throws org.bouncycastle.crypto.CryptoException
    Makes a signature.
    Parameters:
      `data` - raw.
    Returns:
      Base64 encoded string.
    Throws:
      `org.bouncycastle.crypto.CryptoException`