summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-11-08 10:47:15 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-11-08 10:47:15 +0700
commit8e12622ec67e260356702a5f697eeb0e59180236 (patch)
tree2c8eec5bdf5304910c38e212184e9582045caed5
parentAdd Pqc prefix to Pqc factory classes (diff)
downloadBouncyCastle.NET-ed25519-8e12622ec67e260356702a5f697eeb0e59180236.tar.xz
Make factory classes static
-rw-r--r--crypto/src/pkcs/PrivateKeyInfoFactory.cs6
-rw-r--r--crypto/src/security/PrivateKeyFactory.cs6
-rw-r--r--crypto/src/security/PublicKeyFactory.cs6
-rw-r--r--crypto/src/x509/SubjectPublicKeyInfoFactory.cs8
4 files changed, 5 insertions, 21 deletions
diff --git a/crypto/src/pkcs/PrivateKeyInfoFactory.cs b/crypto/src/pkcs/PrivateKeyInfoFactory.cs
index 7f52a1d1b..d6e8ec77c 100644
--- a/crypto/src/pkcs/PrivateKeyInfoFactory.cs
+++ b/crypto/src/pkcs/PrivateKeyInfoFactory.cs
@@ -21,12 +21,8 @@ using Org.BouncyCastle.Utilities;
 
 namespace Org.BouncyCastle.Pkcs
 {
-    public sealed class PrivateKeyInfoFactory
+    public static class PrivateKeyInfoFactory
     {
-        private PrivateKeyInfoFactory()
-        {
-        }
-
         public static PrivateKeyInfo CreatePrivateKeyInfo(
             AsymmetricKeyParameter privateKey)
         {
diff --git a/crypto/src/security/PrivateKeyFactory.cs b/crypto/src/security/PrivateKeyFactory.cs
index e66224a67..5d70423f4 100644
--- a/crypto/src/security/PrivateKeyFactory.cs
+++ b/crypto/src/security/PrivateKeyFactory.cs
@@ -21,12 +21,8 @@ using Org.BouncyCastle.Utilities;
 
 namespace Org.BouncyCastle.Security
 {
-    public sealed class PrivateKeyFactory
+    public static class PrivateKeyFactory
     {
-        private PrivateKeyFactory()
-        {
-        }
-
         public static AsymmetricKeyParameter CreateKey(
             byte[] privateKeyInfoData)
         {
diff --git a/crypto/src/security/PublicKeyFactory.cs b/crypto/src/security/PublicKeyFactory.cs
index 8c3e9db99..775884e94 100644
--- a/crypto/src/security/PublicKeyFactory.cs
+++ b/crypto/src/security/PublicKeyFactory.cs
@@ -20,12 +20,8 @@ using Org.BouncyCastle.Utilities;
 
 namespace Org.BouncyCastle.Security
 {
-    public sealed class PublicKeyFactory
+    public static class PublicKeyFactory
     {
-        private PublicKeyFactory()
-        {
-        }
-
         public static AsymmetricKeyParameter CreateKey(
             byte[] keyInfoData)
         {
diff --git a/crypto/src/x509/SubjectPublicKeyInfoFactory.cs b/crypto/src/x509/SubjectPublicKeyInfoFactory.cs
index b80e298ce..fc0492fe4 100644
--- a/crypto/src/x509/SubjectPublicKeyInfoFactory.cs
+++ b/crypto/src/x509/SubjectPublicKeyInfoFactory.cs
@@ -1,6 +1,5 @@
 using System;
 
-using Org.BouncyCastle.Crypto.Parameters;
 using Org.BouncyCastle.Asn1;
 using Org.BouncyCastle.Asn1.CryptoPro;
 using Org.BouncyCastle.Asn1.EdEC;
@@ -10,6 +9,7 @@ using Org.BouncyCastle.Asn1.Rosstandart;
 using Org.BouncyCastle.Asn1.X509;
 using Org.BouncyCastle.Asn1.X9;
 using Org.BouncyCastle.Crypto;
+using Org.BouncyCastle.Crypto.Parameters;
 using Org.BouncyCastle.Math;
 using Org.BouncyCastle.Math.EC;
 using Org.BouncyCastle.Utilities;
@@ -19,12 +19,8 @@ namespace Org.BouncyCastle.X509
     /// <summary>
     /// A factory to produce Public Key Info Objects.
     /// </summary>
-    public sealed class SubjectPublicKeyInfoFactory
+    public static class SubjectPublicKeyInfoFactory
     {
-        private SubjectPublicKeyInfoFactory()
-        {
-        }
-
         /// <summary>
         /// Create a Subject Public Key Info object for a given public key.
         /// </summary>