ocpp/v2_1/datatype/certificate_hash_data

OCPP 2.1 CertificateHashData data type (schema CertificateHashDataType).

to_json/decoder map to/from its OCPP-J JSON object; new (when present) builds a value from the required fields only.

Types

FieldTypeReqDescription
custom_dataCustomData
hash_algorithmHashAlgorithm
issuer_key_hashStringThe hash of the DER encoded public key: the value (excluding tag and length) of the subject public key field in the issuer’s certificate. (max 128 chars)
issuer_name_hashStringThe hash of the issuer’s distinguished name (DN), that must be calculated over the DER encoding of the issuer’s name field in the certificate being checked. (max 128 chars)
serial_numberStringThe string representation of the hexadecimal value of the serial number without the prefix “0x” and without leading zeroes. (max 40 chars)

Schema: CertificateHashDataType

pub type CertificateHashData {
  CertificateHashData(
    custom_data: option.Option(custom_data.CustomData),
    hash_algorithm: hash_algorithm.HashAlgorithm,
    issuer_key_hash: String,
    issuer_name_hash: String,
    serial_number: String,
  )
}

Constructors

Values

pub fn decoder() -> decode.Decoder(CertificateHashData)

Decode a CertificateHashData from its OCPP-J JSON object, enforcing schema constraints.

pub fn new(
  hash_algorithm hash_algorithm: hash_algorithm.HashAlgorithm,
  issuer_key_hash issuer_key_hash: String,
  issuer_name_hash issuer_name_hash: String,
  serial_number serial_number: String,
) -> CertificateHashData

Construct a CertificateHashData from its required fields, with every optional field set to None.

pub fn to_json(value: CertificateHashData) -> json.Json

Encode a CertificateHashData to its OCPP-J JSON object.

Search Document