Interface ArtifactEncryption


public interface ArtifactEncryption
Interface definition for artifact encryption.
  • Method Details

    • requiredSecretKeys

      Set<String> requiredSecretKeys()
      Defines the required secret keys for particular encryption algorithm.
      Returns:
      set of required secret keys
    • generateSecrets

      Map<String,String> generateSecrets()
      Generates required secrets key/value pairs.
      Returns:
      secrets key/value pairs
      Throws:
      ArtifactEncryptionFailedException - thrown in case of an error while generating secrets
    • encryptStream

      InputStream encryptStream(Map<String,String> secrets, InputStream stream)
      Encrypts artifact stream with provided secrets.
      Parameters:
      secrets - secrets key/value pairs to be used for encryption
      stream - artifact stream to encrypt
      Returns:
      encrypted input stream
      Throws:
      ArtifactEncryptionFailedException - thrown in case of an error while encrypting the provided stream
    • decryptStream

      InputStream decryptStream(Map<String,String> secrets, InputStream stream)
      Decrypts encrypted artifact stream based on provided secrets.
      Parameters:
      secrets - secrets key/value pairs to be used for decryption
      stream - artifact stream to decrypt
      Returns:
      decrypted input stream
      Throws:
      ArtifactEncryptionFailedException - thrown in case of an error while decrypting the provided stream
    • encryptionSizeOverhead

      int encryptionSizeOverhead()
      Size of the underlying encryption algorithm overhead in bytes
      Returns:
      encryption overhead in byte