COSESigStructure.fromJson constructor

COSESigStructure.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory COSESigStructure.fromJson(Map<String, dynamic> json) {
  return COSESigStructure(
      context: COSESigContext.fromValue(json["context"]),
      bodyProtected: COSEProtectedHeaderMap.fromJson(json["body_protected"]),
      signProtected: json["sign_protected"] == null
          ? null
          : COSEProtectedHeaderMap.fromJson(json["sign_protected"]),
      externalAAD: BytesUtils.fromHexString(json["external_aad"]),
      payload: BytesUtils.fromHexString(json["payload"]),
      serializationConfig: COSESerializationConfig.fromJson(
          json["serialization_config"] ?? {}));
}