Class GpgClearsign

java.lang.Object
com.artipie.debian.misc.GpgClearsign

public final class GpgClearsign extends Object
Gpg signature, ain functionality of this class was copy-pasted from https://github.com/bcgit/bc-java/blob/master/pg/src/main/java/org/bouncycastle/openpgp/examples/ClearSignedFileProcessor.java.
Since:
0.4
  • Constructor Details

    • GpgClearsign

      public GpgClearsign(byte[] content)
      Ctor.
      Parameters:
      content - Bytes content to sign
  • Method Details

    • signedContent

      public byte[] signedContent(byte[] key, String pass)
      Signs content with GPG clearsign signature and returns it along with the signature.
      Parameters:
      key - Private key bytes
      pass - Password
      Returns:
      File, signed with gpg
      Throws:
      ArtipieIOException - On IO errors
      ArtipieException - On problems with GPG
    • signature

      public byte[] signature(byte[] key, String pass)
      Signs content with GPG clearsign signature and returns the signature.
      Parameters:
      key - Private key bytes
      pass - Password
      Returns:
      File, signed with gpg
      Throws:
      ArtipieIOException - On IO errors
      ArtipieException - On problems with GPG