[−][src]Trait secure_session::session::SessionManager
Base trait that provides session management.
Required methods
fn deserialize(&self, bytes: &[u8]) -> Result<Session<V>, SessionError>
Given a slice of bytes perform the following options to convert it into a Session
:
- Decrypt (optional)
- Verify signature / MAC
- Parse / deserialize into a
Session
struct
fn serialize(&self, session: &Session<V>) -> Result<Vec<u8>, SessionError>
Given a session perform the following options to convert a Session
into bytes:
- Encode / serialize into bytes
- Encrypt (optional)
- Sign / MAC
fn is_encrypted(&self) -> bool
Whether or not the sessions are encrypted.
Implementors
impl<V: Serialize + DeserializeOwned + Send + Sync> SessionManager<V> for AesGcmSessionManager<V>
[src]
fn deserialize(&self, bytes: &[u8]) -> Result<Session<V>, SessionError>
[src]
fn serialize(&self, session: &Session<V>) -> Result<Vec<u8>, SessionError>
[src]
fn is_encrypted(&self) -> bool
[src]
Whether or not the sessions are encrypted: true
impl<V: Serialize + DeserializeOwned + Send + Sync> SessionManager<V> for MultiSessionManager<V>
[src]
fn deserialize(&self, bytes: &[u8]) -> Result<Session<V>, SessionError>
[src]
fn serialize(&self, session: &Session<V>) -> Result<Vec<u8>, SessionError>
[src]
fn is_encrypted(&self) -> bool
[src]
impl<V: Serialize + DeserializeOwned + Send + Sync> SessionManager<V> for ChaCha20Poly1305SessionManager<V>
[src]
fn deserialize(&self, bytes: &[u8]) -> Result<Session<V>, SessionError>
[src]
fn serialize(&self, session: &Session<V>) -> Result<Vec<u8>, SessionError>
[src]
fn is_encrypted(&self) -> bool
[src]
Whether or not the sessions are encrypted: true