HASH

HASH hashes value using the hashing algorithm given in algorithm (accepted values SHA1, SHA256, and SHA512) and returns the hex encoded hash value.

example HASH("SHA1", "abc") returns a9993e364706816aba3e25717850c26c9cd0d89d.

HASH()'s primary use case is for managing catalog zones:

a method for automatic DNS zone provisioning among DNS primary and secondary name servers by storing and transferring the catalog of zones to be provisioned as one or more regular DNS zones.

Here's an example of a catalog zone:

dnsconfig.js
foo_name_suffix = HASH("SHA1", "foo.name") + ".zones"
D("catalog.example"
    [...]
    , TXT("version", "2")
    , PTR(foo_name_suffix, "foo.name.")
    , A("primaries.ext." + foo_name_suffix, "192.168.1.1")
)

Last updated