示例#1
0
        /// <summary>
        /// Uses RSA algorithm for signing the 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 and private key.
        /// </param>
        /// <returns>
        /// The next fluent API object.
        /// </returns>
        public static IBuilder_HardwareIdentifier WithRsaPrivateKey(this IBuilder_Signer signer, byte[] csbBlobKey)
        {
            var rsaSigner = new RsaSigner(csbBlobKey);

            signer.WithSigner(rsaSigner);
            return(signer as IBuilder_HardwareIdentifier);
        }
示例#2
0
        /// <summary>
        /// Uses RSA algorithm for signing the 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 and private key.
        /// </param>
        /// <returns>
        /// The next fluent API object.
        /// </returns>
        public static IBuilder_HardwareIdentifier WithRsaPrivateKey(this IBuilder_Signer signer, RSAParameters rsaParameters)
        {
            var rsaSigner = new RsaSigner(rsaParameters);

            signer.WithSigner(rsaSigner);
            return(signer as IBuilder_HardwareIdentifier);
        }
示例#3
0
 /// <summary>
 /// Uses RSA algorithm for signing the 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 and private key.
 /// </param>
 /// <returns>
 /// The next fluent API object.
 /// </returns>
 public static IBuilder_HardwareIdentifier WithRsaPrivateKey(this IBuilder_Signer signer, string base64EncodedCsbBlobKey)
 {
     return(signer.WithRsaPrivateKey(Convert.FromBase64String(base64EncodedCsbBlobKey)));
 }