Header.deserialize constructor
Header.deserialize(
- CborListValue cbor
Implementation
factory Header.deserialize(CborListValue cbor) {
if (cbor.value.length == 1) {
return Header(
headerBody: HeaderBody.deserialize(cbor.getIndex(0)),
signature: KESSignature.deserialize(
cbor.getIndex<CborListValue>(0).getIndex(14)));
}
return Header(
headerBody: HeaderBody.deserialize(cbor.getIndex(0)),
signature: KESSignature.deserialize(cbor.getIndex(1)));
}