summary refs log tree commit diff
path: root/crypto/src/tls/crypto/TlsSrpConfig.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/tls/crypto/TlsSrpConfig.cs')
-rw-r--r--crypto/src/tls/crypto/TlsSrpConfig.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/crypto/src/tls/crypto/TlsSrpConfig.cs b/crypto/src/tls/crypto/TlsSrpConfig.cs
new file mode 100644
index 000000000..e31e4a5f2
--- /dev/null
+++ b/crypto/src/tls/crypto/TlsSrpConfig.cs
@@ -0,0 +1,26 @@
+using System;
+
+using Org.BouncyCastle.Math;
+
+namespace Org.BouncyCastle.Tls.Crypto
+{
+    /// <summary>Basic config for SRP.</summary>
+    public class TlsSrpConfig
+    {
+        protected BigInteger[] m_explicitNG;
+
+        /// <summary>Return the (N, g) values used in SRP-6.</summary>
+        /// <returns>(N, g) as a BigInteger array (N=[0], g=[1]).</returns>
+        public BigInteger[] GetExplicitNG()
+        {
+            return (BigInteger[])m_explicitNG.Clone();
+        }
+
+        /// <summary>Set the (N, g) values used for SRP-6.</summary>
+        /// <param name="explicitNG">(N, g) as a BigInteger array (N=[0], g=[1]).</param>
+        public void SetExplicitNG(BigInteger[] explicitNG)
+        {
+            this.m_explicitNG = (BigInteger[])explicitNG.Clone();
+        }
+    }
+}