public RequestInfo( string name, string targetUrl, bool hasToBeSuccessful, IEnumerable <KeyValuePair <string, string> > requestHeaders, int responseStatusCode, IEnumerable <KeyValuePair <string, string> > responseHeaders, string responseData, List <ValidationResult> validationFailures, TimeSpan elapsed, ProofKeyOutput currentProofData, ProofKeyOutput oldProofData) { Name = name; TargetUrl = targetUrl; HasToBeSuccessful = hasToBeSuccessful; RequestHeaders = requestHeaders ?? Enumerable.Empty <KeyValuePair <string, string> >(); ResponseStatusCode = responseStatusCode; ResponseHeaders = responseHeaders ?? Enumerable.Empty <KeyValuePair <string, string> >(); ResponseDataForClient = responseData; ValidationFailures = validationFailures ?? new List <ValidationResult>(); Elapsed = elapsed; CurrentProofData = currentProofData; OldProofData = oldProofData; }
public static ProofKeyOutput GetSignedProofData(ProofKeyInput proofData, RSACryptoServiceProvider rsaAlg) { ProofKeyOutput output = GetProofData(proofData); using (SHA256CryptoServiceProvider hashAlg = new SHA256CryptoServiceProvider()) { byte[] signedProofBytes = rsaAlg.SignData(output.PreSigningBytes, hashAlg); output.SignedBase64ProofKey = Convert.ToBase64String(signedProofBytes); return(output); } }