Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'pg/src/main/java/org/spongycastle/openpgp/operator/PGPDataDecryptor.java')
-rw-r--r--pg/src/main/java/org/spongycastle/openpgp/operator/PGPDataDecryptor.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/pg/src/main/java/org/spongycastle/openpgp/operator/PGPDataDecryptor.java b/pg/src/main/java/org/spongycastle/openpgp/operator/PGPDataDecryptor.java
new file mode 100644
index 00000000..ceeca672
--- /dev/null
+++ b/pg/src/main/java/org/spongycastle/openpgp/operator/PGPDataDecryptor.java
@@ -0,0 +1,30 @@
+package org.spongycastle.openpgp.operator;
+
+import java.io.InputStream;
+
+/**
+ * A decryptor that wraps a stream of PGP encrypted data to decrypt, and optionally integrity check,
+ * the data.
+ */
+public interface PGPDataDecryptor
+{
+ /**
+ * Wraps an encrypted data stream with a stream that will return the decrypted data.
+ *
+ * @param in the encrypted data.
+ * @return a decrypting stream.
+ */
+ InputStream getInputStream(InputStream in);
+
+ /**
+ * Obtains the block size of the encryption algorithm used in this decryptor.
+ *
+ * @return the block size of the cipher in bytes.
+ */
+ int getBlockSize();
+
+ /**
+ * Obtains the digest calculator used to verify the integrity check.
+ */
+ PGPDigestCalculator getIntegrityCalculator();
+}