pub enum AuthenticationPolicy {
PrivateAuthentication,
Signature,
}
Expand description
Authentication policy.
Warning: Take the time to study which is the authentication policy adapted to your specific use case. Choosing an unsuitable authentication policy can be dramatic for your end users.
Variants§
PrivateAuthentication
Only the sender and the recipient have proof that the message was written by one of them.
The recipient knows that he is not the author of the message so he has proof that the message was necessarily written by the sender.
If your use case is the encrypted correspondence between machines in a decentralized network,
and you sometimes need to prove that a machine has sent this or that message (to prove for example that it has not honored a commitment),
then choose policy Signature
instead.
Signature
The sender proves that he is the author of the message.
If the message is publicly disclosed, everyone will have proof that the sender is indeed the one who wrote the message.
In certain uses this can be harmful to the sender: in case of conflict with the recipient,
the latter may threaten to disclose their private correspondence to blackmail the sender.
If your use case is private messaging between humans, choose method PrivateAuthentication
instead.
Trait Implementations§
Source§impl Clone for AuthenticationPolicy
impl Clone for AuthenticationPolicy
Source§fn clone(&self) -> AuthenticationPolicy
fn clone(&self) -> AuthenticationPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AuthenticationPolicy
impl Debug for AuthenticationPolicy
Source§impl From<AuthenticationPolicy> for u8
impl From<AuthenticationPolicy> for u8
Source§fn from(val: AuthenticationPolicy) -> Self
fn from(val: AuthenticationPolicy) -> Self
Source§impl From<u8> for AuthenticationPolicy
impl From<u8> for AuthenticationPolicy
impl Copy for AuthenticationPolicy
Auto Trait Implementations§
impl Freeze for AuthenticationPolicy
impl RefUnwindSafe for AuthenticationPolicy
impl Send for AuthenticationPolicy
impl Sync for AuthenticationPolicy
impl Unpin for AuthenticationPolicy
impl UnwindSafe for AuthenticationPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more