summary refs log tree commit diff
path: root/crypto
diff options
context:
space:
mode:
authorDavid Hook <dgh@bouncycastle.org>2019-01-15 09:36:43 +1100
committerDavid Hook <dgh@bouncycastle.org>2019-01-15 09:36:43 +1100
commit841c7b471565d341c54521fb3bfcefc56c17a26b (patch)
treea8e55e8101e318115b5f036736d54e6e93608729 /crypto
parentupdate (diff)
parentadded missing interface (diff)
downloadBouncyCastle.NET-ed25519-841c7b471565d341c54521fb3bfcefc56c17a26b.tar.xz
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'crypto')
-rw-r--r--crypto/src/crypto/IKeyUnwrapper.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/crypto/src/crypto/IKeyUnwrapper.cs b/crypto/src/crypto/IKeyUnwrapper.cs
new file mode 100644
index 000000000..764ead2ce
--- /dev/null
+++ b/crypto/src/crypto/IKeyUnwrapper.cs
@@ -0,0 +1,24 @@
+namespace Org.BouncyCastle.Crypto
+{
+    /// <summary>
+    /// Base interface for a key unwrapper.
+    /// </summary>
+    /// <typeparam name="A">The algorithm details/parameter type for the key unwrapper.</typeparam>
+    public interface IKeyUnwrapper<out A>
+	{
+        /// <summary>
+        /// The parameter set used to configure this key unwrapper.
+        /// </summary>
+        A AlgorithmDetails { get; }
+
+        /// <summary>
+        /// Unwrap the passed in data.
+        /// </summary>
+        /// <param name="cipherText">The array containing the data to be unwrapped.</param>
+        /// <param name="offset">The offset into cipherText at which the unwrapped data starts.</param>
+        /// <param name="length">The length of the data to be unwrapped.</param>
+        /// <returns>an IBlockResult containing the unwrapped key data.</returns>
+        IBlockResult Unwrap(byte[] cipherText, int offset, int length);
+	}
+}
+