pub struct SecurityBuffer {
pub length: u16,
pub capacity: u16,
pub offset: u32,
}
Expand description
An NTLM security buffer, pointing to a string contained later in the message.
Fields§
§length: u16
§capacity: u16
§offset: u32
Implementations§
Source§impl SecurityBuffer
impl SecurityBuffer
Sourcepub fn for_slice(slice: &[u8]) -> Self
pub fn for_slice(slice: &[u8]) -> Self
Generates a security buffer for the given slice of bytes.
The length and capacity are set to the length of the slice, while the offset is set to 0.
Sourcepub fn apply_to_slice<'a>(
&self,
slice: &'a [u8],
adjust: isize,
) -> Result<&'a [u8], ParsingError>
pub fn apply_to_slice<'a>( &self, slice: &'a [u8], adjust: isize, ) -> Result<&'a [u8], ParsingError>
Applies the security buffer to a slice, extracting the data itself.
The data is assumed to be located in slice
beginning at self.offset
. In case leading
fields have been removed from slice
, the offset may be further adjusted through adjust
.
Trait Implementations§
Source§impl Clone for SecurityBuffer
impl Clone for SecurityBuffer
Source§fn clone(&self) -> SecurityBuffer
fn clone(&self) -> SecurityBuffer
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 SecurityBuffer
impl Debug for SecurityBuffer
Source§impl Default for SecurityBuffer
impl Default for SecurityBuffer
Source§fn default() -> SecurityBuffer
fn default() -> SecurityBuffer
Returns the “default value” for a type. Read more
Source§impl Hash for SecurityBuffer
impl Hash for SecurityBuffer
Source§impl Ord for SecurityBuffer
impl Ord for SecurityBuffer
Source§fn cmp(&self, other: &SecurityBuffer) -> Ordering
fn cmp(&self, other: &SecurityBuffer) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SecurityBuffer
impl PartialEq for SecurityBuffer
Source§impl PartialOrd for SecurityBuffer
impl PartialOrd for SecurityBuffer
Source§impl TryFrom<&[u8]> for SecurityBuffer
impl TryFrom<&[u8]> for SecurityBuffer
impl Eq for SecurityBuffer
impl StructuralPartialEq for SecurityBuffer
Auto Trait Implementations§
impl Freeze for SecurityBuffer
impl RefUnwindSafe for SecurityBuffer
impl Send for SecurityBuffer
impl Sync for SecurityBuffer
impl Unpin for SecurityBuffer
impl UnwindSafe for SecurityBuffer
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