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

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