CertificateType.deserialize constructor
CertificateType.deserialize(
- CborIntValue cbor, {
- CertificateType? validate,
Constructs a CertificateType from a serialized value.
Implementation
factory CertificateType.deserialize(CborIntValue cbor,
{CertificateType? validate}) {
final type = fromValue(cbor.value);
if (validate != null && type != validate) {
throw MessageException("Invalid Certificate type.",
details: {"Excepted": validate, "Type": type});
}
return type;
}