pub trait SessionInitiatePeer {
// Required methods
fn session_id(&self) -> &str;
fn session_create_context(&self) -> Option<Vec<u8>>;
fn session_join_string_bytes(&self) -> Result<Vec<u8>, RemoteSignError>;
fn negotiate_session(
self: Box<Self>,
peer_context: Option<Vec<u8>>,
) -> Result<PeerKeys, RemoteSignError>;
// Provided methods
fn session_join_string_base64(&self) -> Result<String, RemoteSignError> { ... }
fn session_join_string_pem(&self) -> Result<String, RemoteSignError> { ... }
}
Expand description
A peer that initiates a remote signing session.
Required Methods§
Sourcefn session_id(&self) -> &str
fn session_id(&self) -> &str
Obtain the session ID to create / use.
Sourcefn session_create_context(&self) -> Option<Vec<u8>>
fn session_create_context(&self) -> Option<Vec<u8>>
Obtain additional session context to store with the server.
This context will be sent to the peer when it joins.
Sourcefn session_join_string_bytes(&self) -> Result<Vec<u8>, RemoteSignError>
fn session_join_string_bytes(&self) -> Result<Vec<u8>, RemoteSignError>
Obtain the raw bytes constituting the session join string.
Sourcefn negotiate_session(
self: Box<Self>,
peer_context: Option<Vec<u8>>,
) -> Result<PeerKeys, RemoteSignError>
fn negotiate_session( self: Box<Self>, peer_context: Option<Vec<u8>>, ) -> Result<PeerKeys, RemoteSignError>
Finalize a peer joined session using optional context provided by the peer.
Yields encryption keys for this peer.
Provided Methods§
Sourcefn session_join_string_base64(&self) -> Result<String, RemoteSignError>
fn session_join_string_base64(&self) -> Result<String, RemoteSignError>
Obtain the base 64 encoded session join string.
Sourcefn session_join_string_pem(&self) -> Result<String, RemoteSignError>
fn session_join_string_pem(&self) -> Result<String, RemoteSignError>
Obtain the PEM encoded session join string.