private static TimeStampToken RequestTST(byte[] contentToTimestamp, string tsaService, Oid hashAlg, string policy, string nonce, bool certReq, UserCredentials credentials, TimestampResult result)
        {
            byte[] nonceBytes    = null;
            byte[] hashedMessage = DigestUtils.ComputeDigest(contentToTimestamp, hashAlg);
            if (!string.IsNullOrEmpty(nonce))
            {
                nonceBytes = HexStringToBytes(nonce);
            }

            var request = new Request(hashedMessage, hashAlg, nonceBytes, policy, certReq);

            result.TimeStampRequest = request;
            result.Tsq = request.ToByteArray();

            return(TimeStampClient.RequestTimeStampToken(tsaService, request, credentials));
        }