pub struct AuthIdentityBuffers {
pub user: Utf16String,
pub domain: Utf16String,
pub password: Secret<ZeroizedUtf16String>,
}Expand description
Auth identity buffers for password-based logon.
Fields§
§user: Utf16StringUsername.
Must be UTF-16 encoded.
domain: Utf16StringDomain.
Must be UTF-16 encoded.
password: Secret<ZeroizedUtf16String>Password.
Must be UTF-16 encoded.
If the password is an NT hash, it should be prefixed with NTLM_HASH_PREFIX followed by the hash in hexadecimal format.
See NtlmHash for more details.
Implementations§
Source§impl AuthIdentityBuffers
impl AuthIdentityBuffers
Sourcepub fn new(
user: Utf16String,
domain: Utf16String,
password: Utf16String,
) -> Self
pub fn new( user: Utf16String, domain: Utf16String, password: Utf16String, ) -> Self
Creates a new AuthIdentityBuffers object based on provided credentials.
Provided credentials must be UTF-16 encoded.
pub fn is_empty(&self) -> bool
Sourcepub fn from_utf8(user: &str, domain: &str, password: &str) -> Self
pub fn from_utf8(user: &str, domain: &str, password: &str) -> Self
Creates a new AuthIdentityBuffers object based on UTF-8 credentials.
It converts the provided credentials to UTF-16 byte vectors automatically.
Sourcepub fn from_utf8_with_hash(user: &str, domain: &str, nt_hash: &NtlmHash) -> Self
pub fn from_utf8_with_hash(user: &str, domain: &str, nt_hash: &NtlmHash) -> Self
Creates a new AuthIdentityBuffers object based on UTF-8 username and domain, and NT hash for the password.
Trait Implementations§
Source§impl Clone for AuthIdentityBuffers
impl Clone for AuthIdentityBuffers
Source§fn clone(&self) -> AuthIdentityBuffers
fn clone(&self) -> AuthIdentityBuffers
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuthIdentityBuffers
impl Debug for AuthIdentityBuffers
Source§impl Default for AuthIdentityBuffers
impl Default for AuthIdentityBuffers
Source§fn default() -> AuthIdentityBuffers
fn default() -> AuthIdentityBuffers
Returns the “default value” for a type. Read more
Source§impl From<AuthIdentity> for AuthIdentityBuffers
impl From<AuthIdentity> for AuthIdentityBuffers
Source§fn from(credentials: AuthIdentity) -> Self
fn from(credentials: AuthIdentity) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AuthIdentityBuffers
impl PartialEq for AuthIdentityBuffers
Source§impl TryFrom<&AuthIdentityBuffers> for AuthIdentity
impl TryFrom<&AuthIdentityBuffers> for AuthIdentity
Source§impl TryFrom<AuthIdentityBuffers> for AuthIdentity
impl TryFrom<AuthIdentityBuffers> for AuthIdentity
impl Eq for AuthIdentityBuffers
impl StructuralPartialEq for AuthIdentityBuffers
Auto Trait Implementations§
impl Freeze for AuthIdentityBuffers
impl RefUnwindSafe for AuthIdentityBuffers
impl Send for AuthIdentityBuffers
impl Sync for AuthIdentityBuffers
impl Unpin for AuthIdentityBuffers
impl UnsafeUnpin for AuthIdentityBuffers
impl UnwindSafe for AuthIdentityBuffers
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