Rfc3161Encoding
Namespace: Lacuna.Pki.Asn1
Assembly: Lacuna.Pki
Class
public static class Rfc3161Encoding
Hierarquia: object → Rfc3161Encoding
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
| Nome | Tipo | Descrição |
|---|---|---|
request | byte[] | The DER-encoded request to be decoded |
nonce | byte[] | Receives the nonce that might be present in the request |
tsaPolicyId | string | Receives 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
| Nome | Tipo | Descrição |
|---|---|---|
request | byte[] | The DER-encoded request to be decoded |
nonce | byte[] | 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
| Nome | Tipo | Descrição |
|---|---|---|
request | byte[] | 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
| Nome | Tipo | Descrição |
|---|---|---|
response | byte[] | 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
| Nome | Tipo | Descrição |
|---|---|---|
digest | DigestAlgorithmAndValue | The digest algorithm and value to be timestamped |
nonce | byte[] | The nonce to be included on the request (optional). This value can be used to confirm the matching between requests and responses. |
tsaPolicyId | string | The 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
| Nome | Tipo | Descrição |
|---|---|---|
digest | DigestAlgorithmAndValue | The digest algorithm and value to be timestamped |
nonce | byte[] | 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
| Nome | Tipo | Descrição |
|---|---|---|
digest | DigestAlgorithmAndValue | The 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
| Nome | Tipo | Descrição |
|---|---|---|
timestampToken | byte[] | |
statusCode | int | |
statusString | string |
Retorno
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
| Nome | Tipo | Descrição |
|---|---|---|
timestampToken | byte[] | |
statusCode | Rfc3161StatusCodes | |
statusString | string | |
failureInfo | Rfc3161FailureInfos? |
Retorno
Membros herdados
ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()