pub struct IpcryptPfx { /* private fields */ }
Expand description
A structure representing the IPCrypt context for prefix-preserving mode.
Implementations§
Source§impl IpcryptPfx
impl IpcryptPfx
Sourcepub fn generate_key() -> [u8; 32]
pub fn generate_key() -> [u8; 32]
Generates a new random key for encryption.
Sourcepub fn new_random() -> Self
pub fn new_random() -> Self
Creates a new IpcryptPfx instance with a random key.
Sourcepub fn encrypt_ipaddr(&self, ip: IpAddr) -> IpAddr
pub fn encrypt_ipaddr(&self, ip: IpAddr) -> IpAddr
Auto Trait Implementations§
impl Freeze for IpcryptPfx
impl RefUnwindSafe for IpcryptPfx
impl Send for IpcryptPfx
impl Sync for IpcryptPfx
impl Unpin for IpcryptPfx
impl UnwindSafe for IpcryptPfx
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