Electroneum
keyraw.h File Reference

Go to the source code of this file.

Functions

size_t sldns_rr_dnskey_key_size_raw (const unsigned char *keydata, const size_t len, int alg)
 
uint16_t sldns_calc_keytag_raw (uint8_t *key, size_t keysize)
 

Detailed Description

raw key and signature access and conversion

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

Definition in file keyraw.h.

Function Documentation

◆ 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

◆ 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