Пример #1
0
        private Signature CreateSignature(CmsSigner cmsSigner, SignatureContent signatureContent, CngKey privateKey)
        {
            var cms = NativeUtilities.NativeSign(cmsSigner, signatureContent.GetBytes(), privateKey);

            return(Signature.Load(cms));
        }
        /// <summary>
        /// Timestamps data present in the TimestampRequest.
        /// </summary>
        public Task <Signature> TimestampSignatureAsync(TimestampRequest request, ILogger logger, CancellationToken token)
        {
            var timestampedSignature = TimestampData(request, logger, token);

            return(Task.FromResult(Signature.Load(timestampedSignature)));
        }