Пример #1
0
        /// <summary>
        /// Uses RSA algorithm for verifying the signature of a signed license with the specified private key.
        /// </summary>
        /// <param name="signer">
        /// The fluent API object to extend.
        /// </param>
        /// <param name="csbBlobKey">
        /// The CSB BLOB key that contains the public key.
        /// </param>
        /// <returns>
        /// The next fluent API object.
        /// </returns>
        public static IVerifier_ApplicationCode WithRsaPublicKey(this IVerifier_Signer signer, byte[] csbBlobKey)
        {
            var rsaSigner = new RsaSigner(csbBlobKey);

            signer.WithSigner(rsaSigner);
            return(signer as IVerifier_ApplicationCode);
        }
Пример #2
0
        /// <summary>
        /// Uses RSA algorithm for verifying the signature of a signed license with the specified private key.
        /// </summary>
        /// <param name="signer">
        /// The fluent API object to extend.
        /// </param>
        /// <param name="rsaParameters">
        /// The <see cref="RSAParameters" /> object that contains the public key.
        /// </param>
        /// <returns>
        /// The next fluent API object.
        /// </returns>
        public static IVerifier_ApplicationCode WithRsaPublicKey(this IVerifier_Signer signer, RSAParameters rsaParameters)
        {
            var rsaSigner = new RsaSigner(rsaParameters);

            signer.WithSigner(rsaSigner);
            return(signer as IVerifier_ApplicationCode);
        }