Enum trust_dns::rr::dnssec::public_key::PublicKeyEnum
[−]
[src]
pub enum PublicKeyEnum<'k> { Rsa(Rsa<'k>), Ec(Ec<'k>), }
Variants of all know public keys
Variants
Rsa(Rsa<'k>)
RSA keypair, supported by OpenSSL
Ec(Ec<'k>)
Ellyptic curve keypair, supported by OpenSSL
Methods
impl<'k> PublicKeyEnum<'k>
[src]
fn from_public_bytes(
public_key: &'k [u8],
algorithm: Algorithm
) -> DnsSecResult<Self>
public_key: &'k [u8],
algorithm: Algorithm
) -> DnsSecResult<Self>
Converts the bytes into a PulbicKey of the specified algorithm
Trait Implementations
impl<'k> PublicKey for PublicKeyEnum<'k>
[src]
fn public_bytes(&self) -> &[u8]
Returns the public bytes of the public key, in DNS format
fn verify(
&self,
algorithm: Algorithm,
message: &[u8],
signature: &[u8]
) -> DnsSecResult<()>
&self,
algorithm: Algorithm,
message: &[u8],
signature: &[u8]
) -> DnsSecResult<()>
Verifies the hash matches the signature with the current key
. Read more
fn key_tag(&self) -> DnsSecResult<u16>
The key tag is calculated as a hash to more quickly lookup a DNSKEY. Read more