diff --git a/generate_commands.py b/generate_commands.py index 128b4e9..414acf1 100644 --- a/generate_commands.py +++ b/generate_commands.py @@ -95,7 +95,6 @@ def flatten(items): outfile.write("use super::policies::*;\n") outfile.write("use super::*;\n") -outfile.write("use iso7816::command::{CommandBuilder, ExpectedLen};\n") for command, v in data.items(): name = camel_case(command) @@ -187,7 +186,7 @@ def flatten(items): outfile.write(f' /// {arg["comment"]}\n') outfile.write(f' ///\n') if arg_name != "then": - outfile.write(f' /// Serialized to TLV tag [`{arg_name}`]({arg_name})\n') + outfile.write(f' /// Serialized to TLV tag [`{arg_name}`]()\n') else: outfile.write(f' /// Serialized to remaining data\n') @@ -245,7 +244,7 @@ def flatten(items): outfile.write(f' /// {arg["comment"]}\n') outfile.write(f' ///\n') if arg_name != "then": - outfile.write(f' /// Parsed from TLV tag [`{arg_name}`]({arg_name})\n') + outfile.write(f' /// Parsed from TLV tag [`{arg_name}`]()\n') else: outfile.write(f' /// Parsed from remaining data\n') outfile.write(f' pub {arg["name"]}: {ty_for_resp(arg)},\n') diff --git a/src/se05x/commands.rs b/src/se05x/commands.rs index 04e7bc6..47e05af 100644 --- a/src/se05x/commands.rs +++ b/src/se05x/commands.rs @@ -5,14 +5,13 @@ use super::policies::*; use super::*; -use iso7816::command::{CommandBuilder, ExpectedLen}; // ************* CreateSession ************* // #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct CreateSession { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, } @@ -52,7 +51,7 @@ impl DataStream for CreateSession { } #[derive(Clone, Debug)] pub struct CreateSessionResponse { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub session_id: SessionId, } @@ -74,7 +73,7 @@ impl Se05XCommand for CreateSession { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct ExchangeSessionData<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub session_policy: SessionPolicy, /// Serialized to remaining data pub c_mac: &'data [u8], @@ -140,7 +139,7 @@ impl<'data, W: Writer> Se05XCommand for ExchangeSessionData<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct RefreshSession { - /// Serialized to TLV tag [`TAG_POLICY`](TAG_POLICY) + /// Serialized to TLV tag [`TAG_POLICY`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub policy: Option, } @@ -240,7 +239,7 @@ impl Se05XCommand for CloseSession { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct VerifySessionUserId<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub user_id: &'data [u8], } @@ -422,9 +421,9 @@ impl Se05XCommand for ScpExternalAuthenticate { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct SetLockState { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub lock_indicator: TransientIndicator, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub lock_state: LockState, } @@ -466,21 +465,21 @@ pub struct WriteEcKey<'data> { pub is_auth: bool, #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub key_type: Option, - /// Serialized to TLV tag [`TAG_POLICY`](TAG_POLICY) + /// Serialized to TLV tag [`TAG_POLICY`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub policy: Option>, - /// Serialized to TLV tag [`TAG_MAX_ATTEMPTS`](TAG_MAX_ATTEMPTS) + /// Serialized to TLV tag [`TAG_MAX_ATTEMPTS`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub max_attempts: Option>, - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub curve: Option, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub private_key: Option<&'data [u8]>, - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub public_key: Option<&'data [u8]>, } @@ -575,39 +574,39 @@ pub struct WriteRsaKey<'data> { pub key_type: Option, #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub key_format: Option, - /// Serialized to TLV tag [`TAG_POLICY`](TAG_POLICY) + /// Serialized to TLV tag [`TAG_POLICY`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub policy: Option>, - /// Serialized to TLV tag [`TAG_MAX_ATTEMPTS`](TAG_MAX_ATTEMPTS) + /// Serialized to TLV tag [`TAG_MAX_ATTEMPTS`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub max_attempts: Option>, - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub key_size: Option>, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub p: Option<&'data [u8]>, - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub q: Option<&'data [u8]>, - /// Serialized to TLV tag [`TAG_5`](TAG_5) + /// Serialized to TLV tag [`TAG_5`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub dp: Option<&'data [u8]>, - /// Serialized to TLV tag [`TAG_6`](TAG_6) + /// Serialized to TLV tag [`TAG_6`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub dq: Option<&'data [u8]>, - /// Serialized to TLV tag [`TAG_7`](TAG_7) + /// Serialized to TLV tag [`TAG_7`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub inv_q: Option<&'data [u8]>, - /// Serialized to TLV tag [`TAG_8`](TAG_8) + /// Serialized to TLV tag [`TAG_8`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub e: Option<&'data [u8]>, - /// Serialized to TLV tag [`TAG_9`](TAG_9) + /// Serialized to TLV tag [`TAG_9`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub d: Option<&'data [u8]>, - /// Serialized to TLV tag [`TAG_10`](TAG_10) + /// Serialized to TLV tag [`TAG_10`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub n: Option<&'data [u8]>, } @@ -730,15 +729,15 @@ pub struct GenRsaKey<'data> { pub transient: bool, #[cfg_attr(feature = "builder", builder(default))] pub is_auth: bool, - /// Serialized to TLV tag [`TAG_POLICY`](TAG_POLICY) + /// Serialized to TLV tag [`TAG_POLICY`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub policy: Option>, - /// Serialized to TLV tag [`TAG_MAX_ATTEMPTS`](TAG_MAX_ATTEMPTS) + /// Serialized to TLV tag [`TAG_MAX_ATTEMPTS`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub max_attempts: Option>, - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub key_size: Option>, } @@ -810,18 +809,18 @@ pub struct WriteSymmKey<'data> { #[cfg_attr(feature = "builder", builder(default))] pub is_auth: bool, pub key_type: SymmKeyType, - /// Serialized to TLV tag [`TAG_POLICY`](TAG_POLICY) + /// Serialized to TLV tag [`TAG_POLICY`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub policy: Option>, - /// Serialized to TLV tag [`TAG_MAX_ATTEMPTS`](TAG_MAX_ATTEMPTS) + /// Serialized to TLV tag [`TAG_MAX_ATTEMPTS`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub max_attempts: Option>, - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub kek_id: Option, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub value: &'data [u8], } @@ -893,20 +892,20 @@ impl<'data, W: Writer> Se05XCommand for WriteSymmKey<'data> { pub struct WriteBinary<'data> { #[cfg_attr(feature = "builder", builder(default))] pub transient: bool, - /// Serialized to TLV tag [`TAG_POLICY`](TAG_POLICY) + /// Serialized to TLV tag [`TAG_POLICY`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub policy: Option>, - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub offset: Option>, /// Only when the object does not yet exists /// - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub file_length: Option>, - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub data: Option<&'data [u8]>, } @@ -961,15 +960,15 @@ impl<'data, W: Writer> Se05XCommand for WriteBinary<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct WriteUserId<'data> { - /// Serialized to TLV tag [`TAG_POLICY`](TAG_POLICY) + /// Serialized to TLV tag [`TAG_POLICY`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub policy: Option>, - /// Serialized to TLV tag [`TAG_MAX_ATTEMPTS`](TAG_MAX_ATTEMPTS) + /// Serialized to TLV tag [`TAG_MAX_ATTEMPTS`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub max_attempts: Option>, - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub data: &'data [u8], } @@ -1029,15 +1028,15 @@ impl<'data, W: Writer> Se05XCommand for WriteUserId<'data> { pub struct WriteCounter<'data> { #[cfg_attr(feature = "builder", builder(default))] pub transient: bool, - /// Serialized to TLV tag [`TAG_POLICY`](TAG_POLICY) + /// Serialized to TLV tag [`TAG_POLICY`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub policy: Option>, - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub data: Option, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub value: Option>, } @@ -1092,15 +1091,15 @@ impl<'data, W: Writer> Se05XCommand for WriteCounter<'data> { pub struct WritePcr<'data> { #[cfg_attr(feature = "builder", builder(default))] pub transient: bool, - /// Serialized to TLV tag [`TAG_POLICY`](TAG_POLICY) + /// Serialized to TLV tag [`TAG_POLICY`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub policy: Option>, - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub initial_value: Option<&'data [u8]>, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub extend: Option<&'data [u8]>, } @@ -1155,14 +1154,14 @@ impl<'data, W: Writer> Se05XCommand for WritePcr<'data> { pub struct ImportObject<'data> { #[cfg_attr(feature = "builder", builder(default))] pub transient: bool, - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, /// Unlike [`ExportObject::rsa_key_component`][], use None if not importing an RSA key /// - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub rsa_key_component: Option, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub serialized_object: &'data [u8], } @@ -1212,15 +1211,15 @@ impl<'data, W: Writer> Se05XCommand for ImportObject<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct ReadObject { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub offset: Option>, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub length: Option>, - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub rsa_key_component: Option, } @@ -1267,7 +1266,7 @@ impl DataStream for ReadObject { } #[derive(Clone, Debug)] pub struct ReadObjectResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub data: &'data [u8], } @@ -1289,24 +1288,24 @@ impl Se05XCommand for ReadObject { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct ReadAttestObject<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub offset: Option>, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub length: Option>, /// Either [`Mod`][RsaKeyComponent::Mod] or [`PubExp`][RsaKeyComponent::PubExp] /// - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub rsa_key_component: Option, - /// Serialized to TLV tag [`TAG_5`](TAG_5) + /// Serialized to TLV tag [`TAG_5`]() pub attestation_object: ObjectId, - /// Serialized to TLV tag [`TAG_6`](TAG_6) + /// Serialized to TLV tag [`TAG_6`]() pub attestation_algo: AttestationAlgo, - /// Serialized to TLV tag [`TAG_7`](TAG_7) + /// Serialized to TLV tag [`TAG_7`]() pub freshness_random: &'data [u8; 16], } @@ -1376,17 +1375,17 @@ impl<'data, W: Writer> DataStream for ReadAttestObject<'data> { pub struct ReadAttestObjectResponse<'data> { /// Is None when the object is a private key /// - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub data: Option<&'data [u8]>, - /// Parsed from TLV tag [`TAG_2`](TAG_2) + /// Parsed from TLV tag [`TAG_2`]() pub attributes: ObjectAttributes, - /// Parsed from TLV tag [`TAG_3`](TAG_3) + /// Parsed from TLV tag [`TAG_3`]() pub timestamp: &'data [u8; 12], - /// Parsed from TLV tag [`TAG_4`](TAG_4) + /// Parsed from TLV tag [`TAG_4`]() pub freshness_random: &'data [u8; 16], - /// Parsed from TLV tag [`TAG_5`](TAG_5) + /// Parsed from TLV tag [`TAG_5`]() pub chip_unique_id: &'data [u8; 18], - /// Parsed from TLV tag [`TAG_6`](TAG_6) + /// Parsed from TLV tag [`TAG_6`]() pub signature: &'data [u8], } @@ -1421,15 +1420,15 @@ impl<'data, W: Writer> Se05XCommand for ReadAttestObject<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct ReadAttributes<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub offset: Option>, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub length: Option>, - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub rsa_key_component: Option<&'data [u8]>, } @@ -1464,7 +1463,7 @@ impl<'data, W: Writer> DataStream for ReadAttributes<'data> { } #[derive(Clone, Debug)] pub struct ReadAttributesResponse { - /// Parsed from TLV tag [`TAG_2`](TAG_2) + /// Parsed from TLV tag [`TAG_2`]() pub attributes: ObjectAttributes, } @@ -1486,22 +1485,22 @@ impl<'data, W: Writer> Se05XCommand for ReadAttributes<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct ReadAttributesAttest<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub offset: Option>, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub length: Option>, - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub rsa_key_component: Option<&'data [u8]>, - /// Serialized to TLV tag [`TAG_5`](TAG_5) + /// Serialized to TLV tag [`TAG_5`]() pub attestation_object: ObjectId, - /// Serialized to TLV tag [`TAG_6`](TAG_6) + /// Serialized to TLV tag [`TAG_6`]() pub attestation_algo: AttestationAlgo, - /// Serialized to TLV tag [`TAG_7`](TAG_7) + /// Serialized to TLV tag [`TAG_7`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub freshness_random: Option<&'data [u8; 16]>, } @@ -1570,15 +1569,15 @@ impl<'data, W: Writer> DataStream for ReadAttributesAttest<'data> { } #[derive(Clone, Debug)] pub struct ReadAttributesAttestResponse<'data> { - /// Parsed from TLV tag [`TAG_2`](TAG_2) + /// Parsed from TLV tag [`TAG_2`]() pub attributes: ObjectAttributes, - /// Parsed from TLV tag [`TAG_3`](TAG_3) + /// Parsed from TLV tag [`TAG_3`]() pub timestamp: &'data [u8; 12], - /// Parsed from TLV tag [`TAG_4`](TAG_4) + /// Parsed from TLV tag [`TAG_4`]() pub freshness_random: &'data [u8; 16], - /// Parsed from TLV tag [`TAG_5`](TAG_5) + /// Parsed from TLV tag [`TAG_5`]() pub chip_unique_id: &'data [u8; 18], - /// Parsed from TLV tag [`TAG_6`](TAG_6) + /// Parsed from TLV tag [`TAG_6`]() pub signature: &'data [u8], } @@ -1610,11 +1609,11 @@ impl<'data, W: Writer> Se05XCommand for ReadAttributesAttest<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct ExportObject { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, /// Always present. Use [`RsaKeyComponent::Na`][] if not exporting an RSA key. It is the default value with the builder API /// - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default=RsaKeyComponent::Na))] pub rsa_key_component: RsaKeyComponent, } @@ -1643,7 +1642,7 @@ impl DataStream for ExportObject { } #[derive(Clone, Debug)] pub struct ExportObjectResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub data: &'data [u8], } @@ -1665,7 +1664,7 @@ impl Se05XCommand for ExportObject { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct ReadType { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, } @@ -1705,9 +1704,9 @@ impl DataStream for ReadType { } #[derive(Clone, Debug)] pub struct ReadTypeResponse { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub ty: SecureObjectType, - /// Parsed from TLV tag [`TAG_2`](TAG_2) + /// Parsed from TLV tag [`TAG_2`]() pub transient_indicator: TransientIndicator, } @@ -1733,7 +1732,7 @@ impl Se05XCommand for ReadType { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct ReadSize { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, } @@ -1773,7 +1772,7 @@ impl DataStream for ReadSize { } #[derive(Clone, Debug)] pub struct ReadSizeResponse { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub size: Be, } @@ -1795,9 +1794,9 @@ impl Se05XCommand for ReadSize { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct ReadIdList { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub offset: Be, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub filter: SecureObjectFilter, } @@ -1839,9 +1838,9 @@ impl DataStream for ReadIdList { } #[derive(Clone, Debug)] pub struct ReadIdListResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub more: MoreIndicator, - /// Parsed from TLV tag [`TAG_2`](TAG_2) + /// Parsed from TLV tag [`TAG_2`]() pub ids: &'data [u8], } @@ -1864,7 +1863,7 @@ impl Se05XCommand for ReadIdList { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct CheckObjectExists { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, } @@ -1904,7 +1903,7 @@ impl DataStream for CheckObjectExists { } #[derive(Clone, Debug)] pub struct CheckObjectExistsResponse { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub result: Se05XResult, } @@ -1926,7 +1925,7 @@ impl Se05XCommand for CheckObjectExists { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct DeleteSecureObject { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, } @@ -1962,7 +1961,7 @@ impl Se05XCommand for DeleteSecureObject { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct CreateEcCurve { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub curve: EcCurve, } @@ -1996,11 +1995,11 @@ impl Se05XCommand for CreateEcCurve { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct SetEcCurveParam<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub curve: EcCurve, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub param: EcCurveParam, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub value: &'data [u8], } @@ -2038,7 +2037,7 @@ impl<'data, W: Writer> Se05XCommand for SetEcCurveParam<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct GetEcCurveId { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub object_id: ObjectId, } @@ -2064,7 +2063,7 @@ impl DataStream for GetEcCurveId { } #[derive(Clone, Debug)] pub struct GetEcCurveIdResponse { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub curve: EcCurve, } @@ -2107,7 +2106,7 @@ impl DataStream for ReadEcCurveList { } #[derive(Clone, Debug)] pub struct ReadEcCurveListResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub ids: &'data [u8], } @@ -2129,7 +2128,7 @@ impl Se05XCommand for ReadEcCurveList { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct DeleteEcCurve { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub curve: EcCurve, } @@ -2165,9 +2164,9 @@ impl Se05XCommand for DeleteEcCurve { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct CreateDigestObject { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub id: CryptoObjectId, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub subtype: Digest, } @@ -2207,9 +2206,9 @@ impl Se05XCommand for CreateDigestObject { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct CreateCipherObject { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub id: CryptoObjectId, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub subtype: CipherMode, } @@ -2249,9 +2248,9 @@ impl Se05XCommand for CreateCipherObject { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct CreateSignatureObject { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub id: CryptoObjectId, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub subtype: MacAlgo, } @@ -2312,7 +2311,7 @@ impl DataStream for ReadCryptoObjList { } #[derive(Clone, Debug)] pub struct ReadCryptoObjListResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub list: &'data [u8], } @@ -2334,7 +2333,7 @@ impl Se05XCommand for ReadCryptoObjList { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct DeleteCryptoObj { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub id: CryptoObjectId, } @@ -2382,11 +2381,11 @@ impl Se05XCommand for DeleteCryptoObj { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct EcdsaSign<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub algo: EcDsaSignatureAlgo, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub data: &'data [u8], } @@ -2430,7 +2429,7 @@ impl<'data, W: Writer> DataStream for EcdsaSign<'data> { } #[derive(Clone, Debug)] pub struct EcdsaSignResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub signature: &'data [u8], } @@ -2452,9 +2451,9 @@ impl<'data, W: Writer> Se05XCommand for EcdsaSign<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct EddsaSign<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub data: &'data [u8], } @@ -2498,7 +2497,7 @@ impl<'data, W: Writer> DataStream for EddsaSign<'data> { } #[derive(Clone, Debug)] pub struct EddsaSignResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub signature: &'data [u8], } @@ -2520,11 +2519,11 @@ impl<'data, W: Writer> Se05XCommand for EddsaSign<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct EcdaaSign { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub data: [u8; 32], - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() pub random_data: [u8; 32], } @@ -2570,7 +2569,7 @@ impl DataStream for EcdaaSign { } #[derive(Clone, Debug)] pub struct EcdaaSignResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub signature: &'data [u8], } @@ -2592,13 +2591,13 @@ impl Se05XCommand for EcdaaSign { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct EcdsaVerify<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub algo: EcDsaSignatureAlgo, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub data: &'data [u8], - /// Serialized to TLV tag [`TAG_5`](TAG_5) + /// Serialized to TLV tag [`TAG_5`]() pub signature: &'data [u8], } @@ -2632,7 +2631,7 @@ impl<'data, W: Writer> DataStream for EcdsaVerify<'data> { } #[derive(Clone, Debug)] pub struct EcdsaVerifyResponse { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub result: Se05XResult, } @@ -2654,11 +2653,11 @@ impl<'data, W: Writer> Se05XCommand for EcdsaVerify<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct EddsaVerify<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub data: &'data [u8], - /// Serialized to TLV tag [`TAG_5`](TAG_5) + /// Serialized to TLV tag [`TAG_5`]() pub signature: &'data [u8], } @@ -2692,7 +2691,7 @@ impl<'data, W: Writer> DataStream for EddsaVerify<'data> { } #[derive(Clone, Debug)] pub struct EddsaVerifyResponse { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub result: Se05XResult, } @@ -2714,9 +2713,9 @@ impl<'data, W: Writer> Se05XCommand for EddsaVerify<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct EcdhGenerateSharedSecret<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub public_key: &'data [u8], } @@ -2758,7 +2757,7 @@ impl<'data, W: Writer> DataStream for EcdhGenerateSharedSecret<'data> { } #[derive(Clone, Debug)] pub struct EcdhGenerateSharedSecretResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub shared_secret: &'data [u8], } @@ -2780,11 +2779,11 @@ impl<'data, W: Writer> Se05XCommand for EcdhGenerateSharedSecret<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct RsaSign<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub algo: RsaSignatureAlgo, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub data: &'data [u8], } @@ -2828,7 +2827,7 @@ impl<'data, W: Writer> DataStream for RsaSign<'data> { } #[derive(Clone, Debug)] pub struct RsaSignResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub signature: &'data [u8], } @@ -2850,13 +2849,13 @@ impl<'data, W: Writer> Se05XCommand for RsaSign<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct RsaVerify<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub algo: RsaSignatureAlgo, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub data: &'data [u8], - /// Serialized to TLV tag [`TAG_5`](TAG_5) + /// Serialized to TLV tag [`TAG_5`]() pub signature: &'data [u8], } @@ -2890,7 +2889,7 @@ impl<'data, W: Writer> DataStream for RsaVerify<'data> { } #[derive(Clone, Debug)] pub struct RsaVerifyResponse { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub result: Se05XResult, } @@ -2912,11 +2911,11 @@ impl<'data, W: Writer> Se05XCommand for RsaVerify<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct RsaEncrypt<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub algo: RsaEncryptionAlgo, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub plaintext: &'data [u8], } @@ -2960,7 +2959,7 @@ impl<'data, W: Writer> DataStream for RsaEncrypt<'data> { } #[derive(Clone, Debug)] pub struct RsaEncryptResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub ciphertext: &'data [u8], } @@ -2982,11 +2981,11 @@ impl<'data, W: Writer> Se05XCommand for RsaEncrypt<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct RsaDecrypt<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub algo: RsaEncryptionAlgo, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub ciphertext: &'data [u8], } @@ -3030,7 +3029,7 @@ impl<'data, W: Writer> DataStream for RsaDecrypt<'data> { } #[derive(Clone, Debug)] pub struct RsaDecryptResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub plaintext: &'data [u8], } @@ -3052,11 +3051,11 @@ impl<'data, W: Writer> Se05XCommand for RsaDecrypt<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct CipherEncryptInit<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub cipher_id: CryptoObjectId, - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub initialization_vector: Option<&'data [u8]>, } @@ -3095,11 +3094,11 @@ impl<'data, W: Writer> Se05XCommand for CipherEncryptInit<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct CipherDecryptInit<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub cipher_id: CryptoObjectId, - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub initialization_vector: Option<&'data [u8]>, } @@ -3138,11 +3137,11 @@ impl<'data, W: Writer> Se05XCommand for CipherDecryptInit<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct CipherUpdate<'data> { - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub cipher_id: CryptoObjectId, /// input data, can be either plaintext or ciphertext depending on whether cipher_decrypt_init or cipher_encrypt_init was used /// - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub data: &'data [u8], } @@ -3186,7 +3185,7 @@ impl<'data, W: Writer> DataStream for CipherUpdate<'data> { pub struct CipherUpdateResponse<'data> { /// output data /// - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub data: &'data [u8], } @@ -3208,11 +3207,11 @@ impl<'data, W: Writer> Se05XCommand for CipherUpdate<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct CipherFinal<'data> { - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub cipher_id: CryptoObjectId, /// input data, can be either plaintext or ciphertext depending on whether cipher_decrypt_init or cipher_encrypt_init was used /// - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub data: &'data [u8], } @@ -3256,7 +3255,7 @@ impl<'data, W: Writer> DataStream for CipherFinal<'data> { pub struct CipherFinalResponse<'data> { /// output data /// - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub data: &'data [u8], } @@ -3278,13 +3277,13 @@ impl<'data, W: Writer> Se05XCommand for CipherFinal<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct CipherOneShotEncrypt<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub mode: CipherMode, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub plaintext: &'data [u8], - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub initialization_vector: Option<&'data [u8]>, } @@ -3331,7 +3330,7 @@ impl<'data, W: Writer> DataStream for CipherOneShotEncrypt<'data> { } #[derive(Clone, Debug)] pub struct CipherOneShotEncryptResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub ciphertext: &'data [u8], } @@ -3353,13 +3352,13 @@ impl<'data, W: Writer> Se05XCommand for CipherOneShotEncrypt<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct CipherOneShotDecrypt<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub mode: CipherMode, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub ciphertext: &'data [u8], - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub initialization_vector: Option<&'data [u8]>, } @@ -3406,7 +3405,7 @@ impl<'data, W: Writer> DataStream for CipherOneShotDecrypt<'data> { } #[derive(Clone, Debug)] pub struct CipherOneShotDecryptResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub plaintext: &'data [u8], } @@ -3428,9 +3427,9 @@ impl<'data, W: Writer> Se05XCommand for CipherOneShotDecrypt<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct MacGenerateInit { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub mac_id: CryptoObjectId, } @@ -3466,9 +3465,9 @@ impl Se05XCommand for MacGenerateInit { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct MacValidateInit { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub mac_id: CryptoObjectId, } @@ -3504,9 +3503,9 @@ impl Se05XCommand for MacValidateInit { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct MacUpdate<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub data: &'data [u8], - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub mac_id: CryptoObjectId, } @@ -3542,9 +3541,9 @@ impl<'data, W: Writer> Se05XCommand for MacUpdate<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct MacGenerateFinal<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub data: &'data [u8], - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub mac_id: CryptoObjectId, } @@ -3586,7 +3585,7 @@ impl<'data, W: Writer> DataStream for MacGenerateFinal<'data> { } #[derive(Clone, Debug)] pub struct MacGenerateFinalResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub tag: &'data [u8], } @@ -3608,13 +3607,13 @@ impl<'data, W: Writer> Se05XCommand for MacGenerateFinal<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct MacValidateFinal<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub data: &'data [u8], - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub mac_id: CryptoObjectId, /// Tag to validate /// - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub tag: &'data [u8], } @@ -3658,7 +3657,7 @@ impl<'data, W: Writer> DataStream for MacValidateFinal<'data> { } #[derive(Clone, Debug)] pub struct MacValidateFinalResponse { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub result: Se05XResult, } @@ -3680,11 +3679,11 @@ impl<'data, W: Writer> Se05XCommand for MacValidateFinal<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct MacOneShotGenerate<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub algo: MacAlgo, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub data: &'data [u8], } @@ -3728,7 +3727,7 @@ impl<'data, W: Writer> DataStream for MacOneShotGenerate<'data> { } #[derive(Clone, Debug)] pub struct MacOneShotGenerateResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub tag: &'data [u8], } @@ -3750,15 +3749,15 @@ impl<'data, W: Writer> Se05XCommand for MacOneShotGenerate<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct MacOneShotValidate<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub key_id: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub algo: MacAlgo, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub data: &'data [u8], /// tag to validate /// - /// Serialized to TLV tag [`TAG_5`](TAG_5) + /// Serialized to TLV tag [`TAG_5`]() pub tag: &'data [u8], } @@ -3804,7 +3803,7 @@ impl<'data, W: Writer> DataStream for MacOneShotValidate<'data> { } #[derive(Clone, Debug)] pub struct MacOneShotValidateResponse { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub result: Se05XResult, } @@ -3826,21 +3825,21 @@ impl<'data, W: Writer> Se05XCommand for MacOneShotValidate<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct Hkdf<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub ikm: ObjectId, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub digest: Digest, /// up to 64 bytes /// - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub salt: Option<&'data [u8]>, - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub info: Option<&'data [u8]>, /// Up to MAX_APDU_PAYLOAD_LENGTH (= 889) /// - /// Serialized to TLV tag [`TAG_5`](TAG_5) + /// Serialized to TLV tag [`TAG_5`]() pub requested_len: Be, } @@ -3888,7 +3887,7 @@ impl<'data, W: Writer> DataStream for Hkdf<'data> { } #[derive(Clone, Debug)] pub struct HkdfResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub data: &'data [u8], } @@ -3910,20 +3909,20 @@ impl<'data, W: Writer> Se05XCommand for Hkdf<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct Pbkdf2<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub password: ObjectId, /// up to 64 bytes /// - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))] pub salt: Option<&'data [u8]>, /// Up to 0x7FFF /// - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub iterations: Be, /// Up to 512 /// - /// Serialized to TLV tag [`TAG_4`](TAG_4) + /// Serialized to TLV tag [`TAG_4`]() pub requested_len: Be, } @@ -3969,7 +3968,7 @@ impl<'data, W: Writer> DataStream for Pbkdf2<'data> { } #[derive(Clone, Debug)] pub struct Pbkdf2Response<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub data: &'data [u8], } @@ -3991,7 +3990,7 @@ impl<'data, W: Writer> Se05XCommand for Pbkdf2<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct DigestInit { - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub digest_id: CryptoObjectId, } @@ -4025,9 +4024,9 @@ impl Se05XCommand for DigestInit { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct DigestUpdate<'data> { - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub digest_id: CryptoObjectId, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub data: &'data [u8], } @@ -4063,9 +4062,9 @@ impl<'data, W: Writer> Se05XCommand for DigestUpdate<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct DigestFinal<'data> { - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub digest_id: CryptoObjectId, - /// Serialized to TLV tag [`TAG_3`](TAG_3) + /// Serialized to TLV tag [`TAG_3`]() pub data: &'data [u8], } @@ -4107,7 +4106,7 @@ impl<'data, W: Writer> DataStream for DigestFinal<'data> { } #[derive(Clone, Debug)] pub struct DigestFinalResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub digest: &'data [u8], } @@ -4129,9 +4128,9 @@ impl<'data, W: Writer> Se05XCommand for DigestFinal<'data> { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct DigestOneShot<'data> { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub algo: Digest, - /// Serialized to TLV tag [`TAG_2`](TAG_2) + /// Serialized to TLV tag [`TAG_2`]() pub data: &'data [u8], } @@ -4173,7 +4172,7 @@ impl<'data, W: Writer> DataStream for DigestOneShot<'data> { } #[derive(Clone, Debug)] pub struct DigestOneShotResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub digest: &'data [u8], } @@ -4216,7 +4215,7 @@ impl DataStream for GetVersion { } #[derive(Clone, Debug)] pub struct GetVersionResponse { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub version_info: VersionInfo, } @@ -4259,7 +4258,7 @@ impl DataStream for GetTimestamp { } #[derive(Clone, Debug)] pub struct GetTimestampResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub timestamp: &'data [u8; 12], } @@ -4281,7 +4280,7 @@ impl Se05XCommand for GetTimestamp { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct GetFreeMemory { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub memory: Memory, } @@ -4307,7 +4306,7 @@ impl DataStream for GetFreeMemory { } #[derive(Clone, Debug)] pub struct GetFreeMemoryResponse { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub available: Be, } @@ -4329,7 +4328,7 @@ impl Se05XCommand for GetFreeMemory { #[derive(Clone, Debug)] #[cfg_attr(feature = "builder", derive(typed_builder::TypedBuilder))] pub struct GetRandom { - /// Serialized to TLV tag [`TAG_1`](TAG_1) + /// Serialized to TLV tag [`TAG_1`]() pub length: Be, } @@ -4369,7 +4368,7 @@ impl DataStream for GetRandom { } #[derive(Clone, Debug)] pub struct GetRandomResponse<'data> { - /// Parsed from TLV tag [`TAG_1`](TAG_1) + /// Parsed from TLV tag [`TAG_1`]() pub data: &'data [u8], }