Struct rings_core::session::SessionManager
source · pub struct SessionManager { /* private fields */ }Expand description
Manager about Session.
Implementations§
source§impl SessionManager
impl SessionManager
sourcepub fn gen_unsign_info_with_ed25519_pubkey(
ttl: Option<Ttl>,
pubkey: PublicKey
) -> Result<(AuthorizedInfo, SecretKey)>
pub fn gen_unsign_info_with_ed25519_pubkey(
ttl: Option<Ttl>,
pubkey: PublicKey
) -> Result<(AuthorizedInfo, SecretKey)>
Generate unsign info with a given ed25519 pubkey.
sourcepub fn gen_unsign_info_with_pubkey(
ttl: Option<Ttl>,
signer: Option<Signer>,
pubkey: PublicKey
) -> Result<(AuthorizedInfo, SecretKey)>
pub fn gen_unsign_info_with_pubkey(
ttl: Option<Ttl>,
signer: Option<Signer>,
pubkey: PublicKey
) -> Result<(AuthorizedInfo, SecretKey)>
Generate unsigned info with public key.
sourcepub fn gen_unsign_info(
did: Did,
ttl: Option<Ttl>,
signer: Option<Signer>
) -> (AuthorizedInfo, SecretKey)
pub fn gen_unsign_info(
did: Did,
ttl: Option<Ttl>,
signer: Option<Signer>
) -> (AuthorizedInfo, SecretKey)
Generate unsigned info with.
sourcepub fn new(
sig: &[u8],
auth_info: &AuthorizedInfo,
session_key: &SecretKey
) -> Self
pub fn new(
sig: &[u8],
auth_info: &AuthorizedInfo,
session_key: &SecretKey
) -> Self
sig: Signature of AuthorizedInfo.
auth_info: generated from gen_unsign_info.
session_key: temp key from gen_unsign_info.
sourcepub fn new_with_seckey(key: &SecretKey, ttl: Option<Ttl>) -> Result<Self>
pub fn new_with_seckey(key: &SecretKey, ttl: Option<Ttl>) -> Result<Self>
Generate Session with private key. Only use it for unittest.
sourcepub fn renew(
&self,
sig: &[u8],
auth_info: &AuthorizedInfo,
key: &SecretKey
) -> Result<&Self>
pub fn renew(
&self,
sig: &[u8],
auth_info: &AuthorizedInfo,
key: &SecretKey
) -> Result<&Self>
Renew session with new sig.
sourcepub fn session_key(&self) -> Result<SecretKey>
pub fn session_key(&self) -> Result<SecretKey>
Get secret key from SessionManager.
Get authorizer from session.