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