DNS::LDNS::Key(3)
π DNS::LDNS::Key(3) β the DNSSec private key page, bestie edition π
okay so this is the manual page for DNS::LDNS::Key, living in the DNS::LDNS family, filed under User Contributed Perl Documentation. if you've ever been like "bestie where do my DNSSec private keys live," boom, it's here. it's giving cryptographic main character energy and honestly? we're obsessed. π
β¨ NAME β¨
DNS::LDNS::Key β DNSSec private key. that's it, that's the whole vibe. a private key. for DNSSec. slay.
πΈ SYNOPSIS πΈ
here's the whole group chat, laid out exactly how the page has it:
use DNS::LDNS ':all'
key = new DNS::LDNS::Key
key = new DNS::LDNS::Key(file => \*FILE)
key = new DNS::LDNS::Key(filename => 'keyfile')
str = key->to_string
key->print(\*OUTPUT)
key->set_algorithm(alg)
alg = key->algorithm
key->set_flags(flags)
flags = key->flags
key->set_hmac_key(hmac)
hmac = key->hmac_key
key->set_hmac_size(size)
size = key->hmac_size
key->set_origttl(ttl)
ttl = key->origttl
key->set_inception(epoch)
epoch = key->inception
key->set_expiration(epoch)
epoch = key->expiration
key->set_pubkey_owner(rdata)
rdata = key->pubkey_owner
key->set_keytag(tag)
tag = key->keytag
key->set_use(bool)
bool = key->use
str = key->get_file_base_name
rr = key->to_rr
π¦ DESCRIPTION π¦
so basically DNS::LDNS::Key is your DNSSec private key object β it's the thing you make when you want to hold a key, poke at its attributes, spit it back out as a string, or turn it into a resource record. you construct it a few different ways (empty, from an open filehandle, or from a filename), and then you've got a whole little toolkit of getters and setters to play with. lowkey iconic. π
π making one β the constructors
new DNS::LDNS::Keyβ makes a brand-new, blank-ish key object. no file, no nothing. just vibes and potential. β¨new DNS::LDNS::Key(file => \*FILE)β builds the key by reading from an already-open filehandle you hand it.new DNS::LDNS::Key(filename => 'keyfile')β builds the key straight from a path on disk, by name. the "just point me at it" option. π«Ά
π showing it off
str = key->to_stringβ gives you the key as a string. textified. done.key->print(\*OUTPUT)β prints the key out to the filehandle you give it. go off, little key.
π the setters and getters (the whole roster)
every one of these comes as a pair β set it, or get it. no cap.
key->set_algorithm(alg)/alg = key->algorithmβ the algorithm. set it, or read it back.key->set_flags(flags)/flags = key->flagsβ the flags.key->set_hmac_key(hmac)/hmac = key->hmac_keyβ the HMAC key.key->set_hmac_size(size)/size = key->hmac_sizeβ the HMAC size.key->set_origttl(ttl)/ttl = key->origttlβ the original TTL.key->set_inception(epoch)/epoch = key->inceptionβ the inception time, as an epoch.key->set_expiration(epoch)/epoch = key->expirationβ the expiration time, also as an epoch.key->set_pubkey_owner(rdata)/rdata = key->pubkey_ownerβ the public key owner, as rdata.key->set_keytag(tag)/tag = key->keytagβ the key tag.key->set_use(bool)/bool = key->useβ the use flag. a bool, bestie. true or false, no in-between. π
π a couple of one-offs
str = key->get_file_base_nameβ hands you the base name of the file. that's the whole job.rr = key->to_rrβ turns the key into a resource record (rr). this is the glow-up moment. π₯
β SEE ALSO β
like, go look at the ldns project, it's the whole ecosystem this thing is swimming in. π§
π AUTHOR π
Erik Pihl Ostlyngen, <erik.ostlyngen@uninett.no>
give it up for Erik, the original author, we stan. π
π COPYRIGHT AND LICENSE π
Copyright (C) 2013 by UNINETT Norid AS
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.
so yeah β free software, same terms as Perl itself, 5.14.2 or any later Perl 5 you've got lying around. do whatever, it's yours. π
and that's the whole page, bestie β every flag, every setter, every getter, nothing skipped, periodt. π β¨
this little tour was brought to you by perl v5.42.2, dated 2026-06-11 β that's the version and date stamped on DNS::LDNS::Key(3), so if you're quoting me, cite me right. π stay caffeinated, go sign some zones. π¦
π¦ where this page comes from
- fedora 43: perl-ldns 1.9.2-1.fc43 Β· BSD-3-Clause
- fedora 44: perl-ldns 1.9.2-1.fc44 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms