Struct gstreamer_sdp::MIKEYPayload [−]
pub struct MIKEYPayload(_);
Hold the common fields for all payloads
Methods
impl MIKEYPayload
[src]
impl MIKEYPayload
pub fn new(type_: MIKEYPayloadType) -> MIKEYPayload
[src]
pub fn new(type_: MIKEYPayloadType) -> MIKEYPayload
Make a new MIKEYPayload
with type_
.
type_
a MIKEYPayloadType
Returns
a new MIKEYPayload
or None
on failure.
pub fn kemac_get_n_sub(&self) -> u32
[src]
pub fn kemac_get_n_sub(&self) -> u32
Get the number of sub payloads of self
. self
should be of type
MIKEYPayloadType::Kemac
.
Returns
the number of sub payloads in self
pub fn kemac_remove_sub(&mut self, idx: u32) -> bool
[src]
pub fn kemac_remove_sub(&mut self, idx: u32) -> bool
pub fn kemac_set(&mut self, enc_alg: MIKEYEncAlg, mac_alg: MIKEYMacAlg) -> bool
[src]
pub fn kemac_set(&mut self, enc_alg: MIKEYEncAlg, mac_alg: MIKEYMacAlg) -> bool
Set the KEMAC parameters. self
should point to a MIKEYPayloadType::Kemac
payload.
enc_alg
the MIKEYEncAlg
mac_alg
a MIKEYMacAlg
Returns
true
on success
pub fn key_data_set_key(
&mut self,
key_type: MIKEYKeyDataType,
key_data: &[u8]
) -> bool
[src]
pub fn key_data_set_key(
&mut self,
key_type: MIKEYKeyDataType,
key_data: &[u8]
) -> bool
Set key_len
bytes of key_data
of type key_type
as the key for the
MIKEYPayloadType::KeyData
self
.
key_type
a MIKEYKeyDataType
key_len
the length of key_data
key_data
the key of type key_type
Returns
true
on success
pub fn key_data_set_salt(&mut self, salt_data: &[u8]) -> bool
[src]
pub fn key_data_set_salt(&mut self, salt_data: &[u8]) -> bool
Set the salt key data. If salt_len
is 0 and salt_data
is None
, the
salt data will be removed.
salt_len
the length of salt_data
salt_data
the salt
Returns
true
on success
pub fn key_data_set_spi(&mut self, spi_data: &[u8]) -> bool
[src]
pub fn key_data_set_spi(&mut self, spi_data: &[u8]) -> bool
Set the SPI/MKI validity in the MIKEYPayloadType::KeyData
self
.
spi_len
the length of spi_data
spi_data
the SPI/MKI data
Returns
true
on success
pub fn pke_set(&mut self, C: MIKEYCacheType, data: &[u8]) -> bool
[src]
pub fn pke_set(&mut self, C: MIKEYCacheType, data: &[u8]) -> bool
Set the PKE values in self
. self
must be of type
MIKEYPayloadType::Pke
.
C
envelope key cache indicator
data_len
the length of data
data
the encrypted envelope key
Returns
true
on success
pub fn rand_set(&mut self, rand: &[u8]) -> bool
[src]
pub fn rand_set(&mut self, rand: &[u8]) -> bool
Set the random values in a MIKEYPayloadType::Rand
self
.
len
the length of rand
rand
random values
Returns
true
on success
pub fn sp_add_param(&mut self, type_: u8, val: &[u8]) -> bool
[src]
pub fn sp_add_param(&mut self, type_: u8, val: &[u8]) -> bool
Add a new parameter to the MIKEYPayloadType::Sp
self
with type_
, len
and val
.
type_
a type
len
a length
val
len
bytes of data
Returns
true
on success
pub fn sp_get_n_params(&self) -> u32
[src]
pub fn sp_get_n_params(&self) -> u32
Get the number of security policy parameters in a MIKEYPayloadType::Sp
self
.
Returns
the number of parameters in self
pub fn sp_remove_param(&mut self, idx: u32) -> bool
[src]
pub fn sp_remove_param(&mut self, idx: u32) -> bool
Remove the Security Policy parameters from a MIKEYPayloadType::Sp
self
at idx
.
idx
an index
Returns
true
on success
pub fn sp_set(&mut self, policy: u32, proto: MIKEYSecProto) -> bool
[src]
pub fn sp_set(&mut self, policy: u32, proto: MIKEYSecProto) -> bool
Trait Implementations
impl Debug for MIKEYPayload
[src]
impl Debug for MIKEYPayload
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for MIKEYPayload
[src]
impl PartialEq for MIKEYPayload
fn eq(&self, other: &MIKEYPayload) -> bool
[src]
fn eq(&self, other: &MIKEYPayload) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &MIKEYPayload) -> bool
[src]
fn ne(&self, other: &MIKEYPayload) -> bool
This method tests for !=
.
impl Eq for MIKEYPayload
[src]
impl Eq for MIKEYPayload
impl PartialOrd for MIKEYPayload
[src]
impl PartialOrd for MIKEYPayload
fn partial_cmp(&self, other: &MIKEYPayload) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &MIKEYPayload) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &MIKEYPayload) -> bool
[src]
fn lt(&self, other: &MIKEYPayload) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &MIKEYPayload) -> bool
[src]
fn le(&self, other: &MIKEYPayload) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &MIKEYPayload) -> bool
[src]
fn gt(&self, other: &MIKEYPayload) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &MIKEYPayload) -> bool
[src]
fn ge(&self, other: &MIKEYPayload) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for MIKEYPayload
[src]
impl Ord for MIKEYPayload
fn cmp(&self, other: &MIKEYPayload) -> Ordering
[src]
fn cmp(&self, other: &MIKEYPayload) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for MIKEYPayload
[src]
impl Hash for MIKEYPayload
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for MIKEYPayload
impl Clone for MIKEYPayload
fn clone(&self) -> MIKEYPayload
fn clone(&self) -> MIKEYPayload
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl StaticType for MIKEYPayload
impl StaticType for MIKEYPayload
fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
impl Send for MIKEYPayload
[src]
impl Send for MIKEYPayload
Auto Trait Implementations
impl !Sync for MIKEYPayload
impl !Sync for MIKEYPayload