Interface ArtifactEncryption
public interface ArtifactEncryption
Interface definition for artifact encryption.
-
Method Summary
Modifier and TypeMethodDescriptiondecryptStream(Map<String, String> secrets, InputStream stream) Decrypts encrypted artifact stream based on provided secrets.intSize of the underlying encryption algorithm overhead in bytesencryptStream(Map<String, String> secrets, InputStream stream) Encrypts artifact stream with provided secrets.Generates required secrets key/value pairs.Defines the required secret keys for particular encryption algorithm.
-
Method Details
-
requiredSecretKeys
Defines the required secret keys for particular encryption algorithm.- Returns:
- set of required secret keys
-
generateSecrets
Generates required secrets key/value pairs.- Returns:
- secrets key/value pairs
- Throws:
ArtifactEncryptionFailedException- thrown in case of an error while generating secrets
-
encryptStream
Encrypts artifact stream with provided secrets.- Parameters:
secrets- secrets key/value pairs to be used for encryptionstream- artifact stream to encrypt- Returns:
- encrypted input stream
- Throws:
ArtifactEncryptionFailedException- thrown in case of an error while encrypting the provided stream
-
decryptStream
Decrypts encrypted artifact stream based on provided secrets.- Parameters:
secrets- secrets key/value pairs to be used for decryptionstream- 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
-