summary refs log tree commit diff
path: root/crypto/src/openpgp/PgpKdfParameters.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-11-05 15:40:09 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-11-05 15:40:09 +0700
commit7f43ba84bd30b99d0e957920aa660a45f998c522 (patch)
tree7c6f4738d69ab3def1416c397752a3b63b66738f /crypto/src/openpgp/PgpKdfParameters.cs
parentUpdate package icon (diff)
downloadBouncyCastle.NET-ed25519-7f43ba84bd30b99d0e957920aa660a45f998c522.tar.xz
Port OpenPGP support for XDH, EdDSA from bc-java
- see https://github.com/bcgit/bc-csharp/issues/345
Diffstat (limited to 'crypto/src/openpgp/PgpKdfParameters.cs')
-rw-r--r--crypto/src/openpgp/PgpKdfParameters.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/crypto/src/openpgp/PgpKdfParameters.cs b/crypto/src/openpgp/PgpKdfParameters.cs
new file mode 100644
index 000000000..c78448939
--- /dev/null
+++ b/crypto/src/openpgp/PgpKdfParameters.cs
@@ -0,0 +1,21 @@
+using System;
+
+namespace Org.BouncyCastle.Bcpg.OpenPgp
+{
+    internal sealed class PgpKdfParameters
+        //: IPgpAlgorithmParameters
+    {
+        private readonly HashAlgorithmTag m_hashAlgorithm;
+        private readonly SymmetricKeyAlgorithmTag m_symmetricWrapAlgorithm;
+
+        public PgpKdfParameters(HashAlgorithmTag hashAlgorithm, SymmetricKeyAlgorithmTag symmetricWrapAlgorithm)
+        {
+            m_hashAlgorithm = hashAlgorithm;
+            m_symmetricWrapAlgorithm = symmetricWrapAlgorithm;
+        }
+
+        public HashAlgorithmTag HashAlgorithm => m_hashAlgorithm;
+
+        public SymmetricKeyAlgorithmTag SymmetricWrapAlgorithm => m_symmetricWrapAlgorithm;
+    }
+}