[−][src]Struct opcua_server::prelude::PKey
This is a wrapper around an OpenSSL asymmetric key pair. Since openssl 0.10, the PKey is either
a public or private key so we have to differentiate that as well.
Implementations
impl PKey<Private>[src]
pub fn new(bit_length: u32) -> PKey<Private>[src]
pub fn wrap_private_key(pkey: PKey<Private>) -> PKey<Private>[src]
pub fn from_pem(pem: &[u8]) -> Result<PKey<Private>, ()>[src]
pub fn private_key_to_pem(&self) -> Result<Vec<u8>, ()>[src]
pub fn sign_hmac_sha1(
&self,
data: &[u8],
signature: &mut [u8]
) -> Result<usize, StatusCode>[src]
&self,
data: &[u8],
signature: &mut [u8]
) -> Result<usize, StatusCode>
Signs the data using RSA-SHA1
pub fn sign_hmac_sha256(
&self,
data: &[u8],
signature: &mut [u8]
) -> Result<usize, StatusCode>[src]
&self,
data: &[u8],
signature: &mut [u8]
) -> Result<usize, StatusCode>
Signs the data using RSA-SHA256
pub fn sign_hmac_sha256_pss(
&self,
data: &[u8],
signature: &mut [u8]
) -> Result<usize, StatusCode>[src]
&self,
data: &[u8],
signature: &mut [u8]
) -> Result<usize, StatusCode>
Signs the data using RSA-SHA256-PSS
pub fn private_decrypt(
&self,
src: &[u8],
dst: &mut [u8],
padding: RsaPadding
) -> Result<usize, ()>[src]
&self,
src: &[u8],
dst: &mut [u8],
padding: RsaPadding
) -> Result<usize, ()>
Decrypts data in src to dst using the specified padding and returning the size of the decrypted data in bytes or an error.
impl PKey<Public>[src]
pub fn wrap_public_key(pkey: PKey<Public>) -> PKey<Public>[src]
pub fn verify_hmac_sha1(
&self,
data: &[u8],
signature: &[u8]
) -> Result<bool, StatusCode>[src]
&self,
data: &[u8],
signature: &[u8]
) -> Result<bool, StatusCode>
Verifies the data using RSA-SHA1
pub fn verify_hmac_sha256(
&self,
data: &[u8],
signature: &[u8]
) -> Result<bool, StatusCode>[src]
&self,
data: &[u8],
signature: &[u8]
) -> Result<bool, StatusCode>
Verifies the data using RSA-SHA256
pub fn verify_hmac_sha256_pss(
&self,
data: &[u8],
signature: &[u8]
) -> Result<bool, StatusCode>[src]
&self,
data: &[u8],
signature: &[u8]
) -> Result<bool, StatusCode>
Verifies the data using RSA-SHA256-PSS
pub fn public_encrypt(
&self,
src: &[u8],
dst: &mut [u8],
padding: RsaPadding
) -> Result<usize, ()>[src]
&self,
src: &[u8],
dst: &mut [u8],
padding: RsaPadding
) -> Result<usize, ()>
Encrypts data from src to dst using the specified padding and returns the size of encrypted data in bytes or an error.
Trait Implementations
impl<T> Debug for PKey<T>[src]
impl KeySize for PKey<Public>[src]
fn bit_length(&self) -> usize[src]
Length in bits
fn size(&self) -> usize[src]
fn calculate_cipher_text_size(
&self,
data_size: usize,
padding: RsaPadding
) -> usize[src]
&self,
data_size: usize,
padding: RsaPadding
) -> usize
fn plain_text_block_size(&self, padding: RsaPadding) -> usize[src]
fn cipher_text_block_size(&self) -> usize[src]
impl KeySize for PKey<Private>[src]
fn bit_length(&self) -> usize[src]
Length in bits
fn size(&self) -> usize[src]
fn calculate_cipher_text_size(
&self,
data_size: usize,
padding: RsaPadding
) -> usize[src]
&self,
data_size: usize,
padding: RsaPadding
) -> usize
fn plain_text_block_size(&self, padding: RsaPadding) -> usize[src]
fn cipher_text_block_size(&self) -> usize[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for PKey<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for PKey<T>
impl<T> Sync for PKey<T>
impl<T> Unpin for PKey<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for PKey<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,