예제 #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));
        }
예제 #2
0
        public static ISignValue Sign(byte[] buffer, string privateKey)
        {
            var key      = Factory.ReadFromPrivateKey(privateKey);
            var function = Factory.Create(key);

            return(function.Sign(buffer));
        }
예제 #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));
        }
예제 #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));
        }
예제 #5
0
 public static DsaKey GenerateKey(AsymmetricKeyMode mode, int keySize = 1024) => Factory.GenerateKey(mode, keySize);
예제 #6
0
 public static IDSA Create(DsaKey key) => Factory.Create(key);
예제 #7
0
 public static IDSA Create(AsymmetricKeyMode mode, int keySize) => Factory.Create(mode, keySize);
예제 #8
0
 public static IDSA Create(AsymmetricKeyMode mode) => Factory.Create(mode);
예제 #9
0
 public static IDSA Create() => Factory.Create();
예제 #10
0
 public static DsaKey ReadFromPrivateKey(string xmlPrivateKey) => Factory.ReadFromPrivateKey(xmlPrivateKey);
예제 #11
0
 public static DsaKey ReadFromPublicKey(string xmlPublicKey) => Factory.ReadFromPublicKey(xmlPublicKey);