Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #3
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="base64EncodedCsbBlobKey">
 /// The base64 encoded 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, string base64EncodedCsbBlobKey)
 {
     return(signer.WithRsaPublicKey(Convert.FromBase64String(base64EncodedCsbBlobKey)));
 }