Exemple #1
0
        /// <summary>
        /// Metoda za validaciju koja upravlja objektom asimetričnog kriptiranja
        /// </summary>
        /// <param name="digest">Sažetak zapisan u bajtovima</param>
        /// <param name="signature">String parametar sa potpisom</param>
        /// <returns></returns>
        private bool DocumentValidation(byte[] digest, string signature)
        {
            AsymmetricCryptography rsaObject = new AsymmetricCryptography(true);
            bool valid = rsaObject.ValidateDocumentRSA(digest, signature);

            return(valid);
        }
Exemple #2
0
        private string SignWithRSA(byte[] digest)
        {
            AsymmetricCryptography rsaObject = new AsymmetricCryptography(true);

            rsaObject.GenerateKeys();
            string signature = rsaObject.SignDocumentRSA(digest);

            return(signature);
        }