keyraw.h File Reference

raw key and signature access and conversion More...

Functions

size_t sldns_rr_dnskey_key_size_raw (const unsigned char *keydata, const size_t len, int alg)
 get the length of the keydata in bits More...
 
uint16_t sldns_calc_keytag_raw (uint8_t *key, size_t keysize)
 Calculates keytag of DNSSEC key, operates on wireformat rdata. More...
 

Detailed Description

raw key and signature access and conversion

Since those functions heavily rely op cryptographic operations, this module is dependent on openssl.

Function Documentation

◆ sldns_rr_dnskey_key_size_raw()

size_t sldns_rr_dnskey_key_size_raw ( const unsigned char *  keydata,
const size_t  len,
int  alg 
)

get the length of the keydata in bits

Parameters
[in]keydatathe raw key data
[in]lenthe length of the keydata
[in]algthe cryptographic algorithm this is a key for
Returns
the keysize in bits, or 0 on error

Referenced by dnskey_get_keysize(), and dnskey_size_is_supported().

◆ sldns_calc_keytag_raw()

uint16_t sldns_calc_keytag_raw ( uint8_t *  key,
size_t  keysize 
)

Calculates keytag of DNSSEC key, operates on wireformat rdata.

Parameters
[in]keythe key as uncompressed wireformat rdata.
[in]keysizelength of key data.
Returns
the keytag

Referenced by dnskey_calc_keytag().