pub enum TorAuthentication {
Null,
SafeCookie(Option<Vec<u8>>),
HashedPassword(String),
}
Expand description
Methods for Tor authentication:
- Null - No authentication
- SafeCookie -
SAFECOOKIE
authentication - HashedPassword - pass the hashed password to authenticate
With SafeCookie
auth, you can either pass in the cookie value as a binary vector, or, if you
pass in “None”, it will call the PROTOCOLINFO command to get the location of the cookie file,
and attempt to read that and pass the value to authenticate.
Note that we don’t support plain COOKIE
authentication, since that’s been determmined to be
unsafe.
Variants§
Implementations§
Source§impl TorAuthentication
impl TorAuthentication
Sourcepub async fn authenticate(
&self,
connection: &mut TorControlConnection,
) -> Result<(), TorError>
pub async fn authenticate( &self, connection: &mut TorControlConnection, ) -> Result<(), TorError>
Authenticate using this method to the server
Auto Trait Implementations§
impl Freeze for TorAuthentication
impl RefUnwindSafe for TorAuthentication
impl Send for TorAuthentication
impl Sync for TorAuthentication
impl Unpin for TorAuthentication
impl UnwindSafe for TorAuthentication
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
Mutably borrows from an owned value. Read more