示例#1
0
        public void AuthoritySign(SignableRequest request, string appId, PrivateKey appKey)
        {
            var fingerprint = this.crypto.CalculateFingerprint(request.Snapshot);
            var signature   = this.crypto.Sign(fingerprint.GetValue(), appKey);

            request.AppendSignature(appId, signature);
        }
示例#2
0
        /// <summary>
        /// Signs the request with owner's Private key.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <param name="privateKey">The private key.</param>
        public void SelfSign(SignableRequest request, PrivateKey privateKey)
        {
            var fingerprint = this.crypto.CalculateFingerprint(request.Snapshot);
            var signature   = this.crypto.Sign(fingerprint.GetValue(), privateKey);

            request.AppendSignature(fingerprint.ToHEX(), signature);
        }