Jarkko Sakkinen<p>TPM2 command encoding with <a class="hashtag" href="https://social.kernel.org/tag/bincode" rel="nofollow noopener noreferrer" target="_blank">#bincode</a> and <a class="hashtag" href="https://social.kernel.org/tag/serde" rel="nofollow noopener noreferrer" target="_blank">#serde</a>:</p><pre><code> let options = DefaultOptions::new()
.with_fixint_encoding()
.with_big_endian();
buf.extend(&options.serialize(&(Tag::NoSessions as u16)).unwrap());
buf.extend(&options.serialize(&22_u32).unwrap());
buf.extend(
&options
.serialize(&(CommandCode::GetCapability as u32))
.unwrap(),
);
buf.extend(&options.serialize(&(Capability::Handles as u32)).unwrap());
buf.extend(&options.serialize(&HR_PERSISTENT).unwrap());
buf.extend(&options.serialize(&1_u32).unwrap());
</code></pre><p><a class="hashtag" href="https://social.kernel.org/tag/rust" rel="nofollow noopener noreferrer" target="_blank">#rust</a> <a class="hashtag" href="https://social.kernel.org/tag/rustlang" rel="nofollow noopener noreferrer" target="_blank">#rustlang</a></p>