Esempio n. 1
0
        /// <summary>
        /// Проверяет цифровую подпись.
        /// </summary>
        public bool VerifySignature(byte[] data, int dataOffset, int dataLength, object hashAlgorithm, byte[] signature)
        {
            var hash = CryptographyUtils.ObjToHashAlgorithm(hashAlgorithm).ComputeHash(data, dataOffset, dataLength);

            return(VerifyHash(hash, signature));
        }
Esempio n. 2
0
        public bool VerifySignature(Stream inputStream, object hashAlgorithm, byte[] signature)
        {
            var hash = CryptographyUtils.ObjToHashAlgorithm(hashAlgorithm).ComputeHash(inputStream);

            return(VerifyHash(hash, signature));
        }
Esempio n. 3
0
        public byte[] CreateSignature(byte[] data, int dataOffset, int dataLength, object hashAlgorithm)
        {
            var hash = CryptographyUtils.ObjToHashAlgorithm(hashAlgorithm).ComputeHash(data, dataOffset, dataLength);

            return(SignHash(hash));
        }
Esempio n. 4
0
        public bool VerifySignature(byte[] buffer, object hashAlgorithm, byte[] signature)
        {
            var hash = CryptographyUtils.ObjToHashAlgorithm(hashAlgorithm).ComputeHash(buffer);

            return(VerifyHash(hash, signature));
        }
Esempio n. 5
0
        public byte[] CreateSignature(Stream data, object hashAlgorithm)
        {
            var hash = CryptographyUtils.ObjToHashAlgorithm(hashAlgorithm).ComputeHash(data);

            return(SignHash(hash));
        }