Package sop

Interface SOP


public interface SOP
Stateless OpenPGP Interface. This class provides a stateless interface to various OpenPGP related operations.
Note: Subcommand objects acquired by calling any method of this interface are not intended for reuse. If you for example need to generate multiple keys, make a dedicated call to generateKey() once per key generation.
  • Method Details

    • version

      Version version()
      Get information about the implementations name and version.
      Returns:
      version
    • generateKey

      GenerateKey generateKey()
      Generate a secret key. Customize the operation using the builder GenerateKey.
      Returns:
      builder instance
    • extractCert

      ExtractCert extractCert()
      Extract a certificate (public key) from a secret key. Customize the operation using the builder ExtractCert.
      Returns:
      builder instance
    • sign

      default DetachedSign sign()
      Create detached signatures. Customize the operation using the builder DetachedSign.

      If you want to sign a message inline, use inlineSign() instead.

      Returns:
      builder instance
    • detachedSign

      DetachedSign detachedSign()
      Create detached signatures. Customize the operation using the builder DetachedSign.

      If you want to sign a message inline, use inlineSign() instead.

      Returns:
      builder instance
    • inlineSign

      InlineSign inlineSign()
      Sign a message using inline signatures.

      If you need to create detached signatures, use detachedSign() instead.

      Returns:
      builder instance
    • verify

      default DetachedVerify verify()
      Verify detached signatures. Customize the operation using the builder DetachedVerify.

      If you need to verify an inline-signed message, use inlineVerify() instead.

      Returns:
      builder instance
    • detachedVerify

      DetachedVerify detachedVerify()
      Verify detached signatures. Customize the operation using the builder DetachedVerify.

      If you need to verify an inline-signed message, use inlineVerify() instead.

      Returns:
      builder instance
    • inlineVerify

      InlineVerify inlineVerify()
      Verify signatures of an inline-signed message.

      If you need to verify detached signatures over a message, use detachedVerify() instead.

      Returns:
      builder instance
    • inlineDetach

      InlineDetach inlineDetach()
      Detach signatures from an inline signed message.
      Returns:
      builder instance
    • encrypt

      Encrypt encrypt()
      Encrypt a message. Customize the operation using the builder Encrypt.
      Returns:
      builder instance
    • decrypt

      Decrypt decrypt()
      Decrypt a message. Customize the operation using the builder Decrypt.
      Returns:
      builder instance
    • armor

      Armor armor()
      Convert binary OpenPGP data to ASCII. Customize the operation using the builder Armor.
      Returns:
      builder instance
    • dearmor

      Dearmor dearmor()
      Converts ASCII armored OpenPGP data to binary. Customize the operation using the builder Dearmor.
      Returns:
      builder instance
    • listProfiles

      ListProfiles listProfiles()
      List supported Profiles of a subcommand.
      Returns:
      builder instance
    • revokeKey

      RevokeKey revokeKey()
      Revoke one or more secret keys.
      Returns:
      builder instance
    • changeKeyPassword

      ChangeKeyPassword changeKeyPassword()
      Update a key's password.
      Returns:
      builder instance