Be aware: Foundation will NEVER ask for your seed words, device PIN, or call you unexpectedly. If anyone does, it's a scam.

Struct

ScChallenge

pub struct ScChallenge(pub [u8; 104]);
Expand description

A message sent from the server to the device. Includes the intermediate challenge, deadline and the server signature, in the following binary format:

------------------------------------
| challenge | deadline | signature |
| 32 bytes  | 8 bytes  | 64 bytes  |
------------------------------------

Tuple Fields

0: [u8; 104]

Implementations

impl ScChallenge

pub const SIZE: usize = 104

Trait Implementations

impl Archive for ScChallenge
where [u8; 104]: Archive,

const COPY_OPTIMIZATION: CopyOptimization<Self>

An optimization flag that allows the bytes of this type to be copied directly to a writer instead of calling serialize. Read more

type Archived = ArchivedScChallenge

The archived representation of this type. Read more

type Resolver = ScChallengeResolver

The resolver for this type. It must contain all the additional information from serializing needed to make the archived type from the normal type.

fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)

Creates the archived version of this value at the given position and writes it to the given output. Read more

impl BlockingArchive for ScChallenge

type Response = Result<ScProof, ScChallengeError>

response type for this message

impl Debug for ScChallenge

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

impl<__D: Fallible + ?Sized> Deserialize<ScChallenge, __D> for Archived<ScChallenge>
where [u8; 104]: Archive, <[u8; 104] as Archive>::Archived: Deserialize<[u8; 104], __D>,

fn deserialize( &self, deserializer: &mut __D, ) -> Result<ScChallenge, <__D as Fallible>::Error>

Deserializes using the given deserializer

impl MessageId for ScChallenge

const ID: MessageId = 22usize

unique message identifier

const SERVER: &'static str = "os/security"

target server name

impl<__S: Fallible + ?Sized> Serialize<__S> for ScChallenge
where [u8; 104]: Serialize<__S>,

fn serialize( &self, serializer: &mut __S, ) -> Result<<Self as Archive>::Resolver, <__S as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.

Auto Trait Implementations

impl Freeze for ScChallenge

impl RefUnwindSafe for ScChallenge

impl Send for ScChallenge

impl Sync for ScChallenge

impl Unpin for ScChallenge

impl UnsafeUnpin for ScChallenge

impl UnwindSafe for ScChallenge