Pular para o conteúdo principal

Rfc3161Encoding

Namespace: Lacuna.Pki.Asn1
Assembly: Lacuna.Pki
Class

public static class Rfc3161Encoding

Hierarquia: objectRfc3161Encoding

Métodos

DecodeRequest(byte[], out byte[], out string)

Decodes a RFC 3161 timestamp request into a digest algorithm and value

public static DigestAlgorithmAndValue DecodeRequest(byte[] request, out byte[] nonce, out string tsaPolicyId)

Parâmetros

NomeTipoDescrição
requestbyte[]The DER-encoded request to be decoded
noncebyte[]Receives the nonce that might be present in the request
tsaPolicyIdstringReceives the TSA policy ID that might be present in the request

Retorno

DigestAlgorithmAndValue — The digest algorithm and value ("message imprint") contained in the request


DecodeRequest(byte[], out byte[])

Decodes a RFC 3161 timestamp request into a digest algorithm and value

public static DigestAlgorithmAndValue DecodeRequest(byte[] request, out byte[] nonce)

Parâmetros

NomeTipoDescrição
requestbyte[]The DER-encoded request to be decoded
noncebyte[]Outputs the nonce that might be present in the request

Retorno

DigestAlgorithmAndValue — The digest algorithm and value ("message imprint") contained in the request


DecodeRequest(byte[])

Decodes a RFC 3161 timestamp request into a digest algorithm and value

public static DigestAlgorithmAndValue DecodeRequest(byte[] request)

Parâmetros

NomeTipoDescrição
requestbyte[]The DER-encoded request to be decoded

Retorno

DigestAlgorithmAndValue — The digest algorithm and value ("message imprint") contained in the request


DecodeResponse(byte[])

Decodes a RFC 3161 timestamp response (TimeStampResp)

public static CadesTimestamp DecodeResponse(byte[] response)

Parâmetros

NomeTipoDescrição
responsebyte[]The response content

Retorno

CadesTimestamp — The cades timestamp signture


EncodeRequest(DigestAlgorithmAndValue, byte[], string)

Encodes an RFC 3161 timestamp request in DER with an optional nonce and TSA policy ID

public static byte[] EncodeRequest(DigestAlgorithmAndValue digest, byte[] nonce, string tsaPolicyId)

Parâmetros

NomeTipoDescrição
digestDigestAlgorithmAndValueThe digest algorithm and value to be timestamped
noncebyte[]The nonce to be included on the request (optional). This value can be used to confirm the matching between requests and responses.
tsaPolicyIdstringThe OID of the policy to be passed to the TSA when requesting timestamps (optional). Some TSAs use this parameter to distinguish between types of timestamps.

Retorno

byte[] — The DER-encoded request according to RFC 3161 (Timestamp Protocol)


EncodeRequest(DigestAlgorithmAndValue, byte[])

Encodes an RFC 3161 timestamp request in DER with an optional nonce

public static byte[] EncodeRequest(DigestAlgorithmAndValue digest, byte[] nonce)

Parâmetros

NomeTipoDescrição
digestDigestAlgorithmAndValueThe digest algorithm and value to be timestamped
noncebyte[]The nonce to be included on the request (optional). This value can be used to confirm the matching between requests and responses.

Retorno

byte[] — The DER-encoded request according to RFC 3161 (Timestamp Protocol)


EncodeRequest(DigestAlgorithmAndValue)

Encodes an RFC 3161 timestamp request in DER

public static byte[] EncodeRequest(DigestAlgorithmAndValue digest)

Parâmetros

NomeTipoDescrição
digestDigestAlgorithmAndValueThe digest algorithm and value to be timestamped

Retorno

byte[] — The DER-encoded request according to RFC 3161 (Timestamp Protocol)


EncodeResponse(byte[], int, string)

[Obsolete("Use EncodeResponse method with enum parameters instead of int")]
public static byte[] EncodeResponse(byte[] timestampToken, int statusCode = 0, string statusString = null)

Parâmetros

NomeTipoDescrição
timestampTokenbyte[]
statusCodeint
statusStringstring

Retorno

byte[]


EncodeResponse(byte[], Rfc3161StatusCodes, string, Rfc3161FailureInfos?)

Encodes a RFC 3161 timestamp response

public static byte[] EncodeResponse(byte[] timestampToken, Rfc3161StatusCodes statusCode, string statusString = null, Rfc3161FailureInfos? failureInfo = null)

Parâmetros

NomeTipoDescrição
timestampTokenbyte[]
statusCodeRfc3161StatusCodes
statusStringstring
failureInfoRfc3161FailureInfos?

Retorno

byte[]


Membros herdados

ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()