keyraw.c File Reference

Implementation of raw DNSKEY functions (work on wire rdata). More...

#include "config.h"
#include "sldns/keyraw.h"
#include "sldns/rrdef.h"

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

Implementation of raw DNSKEY functions (work on wire rdata).

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().