Beispiel #1
0
        public static bool Verify(byte[] buffer, byte[] rgbSignature, string publicKey)
        {
            var key      = Factory.ReadFromPublicKey(publicKey);
            var function = Factory.Create(key);

            return(function.Verify(buffer, rgbSignature));
        }
Beispiel #2
0
        public static ISignValue Sign(byte[] buffer, string privateKey)
        {
            var key      = Factory.ReadFromPrivateKey(privateKey);
            var function = Factory.Create(key);

            return(function.Sign(buffer));
        }
Beispiel #3
0
        public static bool Verify(string text, string rgbSignature, string publicKey, Encoding encoding = null)
        {
            var key      = Factory.ReadFromPublicKey(publicKey);
            var function = Factory.Create(key);

            return(function.Verify(text, rgbSignature, encoding));
        }
Beispiel #4
0
        public static ISignValue Sign(string text, string privateKey, Encoding encoding = null)
        {
            var key      = Factory.ReadFromPrivateKey(privateKey);
            var function = Factory.Create(key);

            return(function.Sign(text, encoding));
        }
Beispiel #5
0
 public static DsaKey GenerateKey(AsymmetricKeyMode mode, int keySize = 1024) => Factory.GenerateKey(mode, keySize);
Beispiel #6
0
 public static IDSA Create(DsaKey key) => Factory.Create(key);
Beispiel #7
0
 public static IDSA Create(AsymmetricKeyMode mode, int keySize) => Factory.Create(mode, keySize);
Beispiel #8
0
 public static IDSA Create(AsymmetricKeyMode mode) => Factory.Create(mode);
Beispiel #9
0
 public static IDSA Create() => Factory.Create();
Beispiel #10
0
 public static DsaKey ReadFromPrivateKey(string xmlPrivateKey) => Factory.ReadFromPrivateKey(xmlPrivateKey);
Beispiel #11
0
 public static DsaKey ReadFromPublicKey(string xmlPublicKey) => Factory.ReadFromPublicKey(xmlPublicKey);