From: bert hubert Date: Fri, 2 Feb 2018 12:39:28 +0000 (+0100) Subject: add documentation to dnsdist X-Git-Tag: dnsdist-1.4.0-alpha1~27^2~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83cfccaa9a1d62a22b9088e370ec0fb786397ed6;p=pdns add documentation to dnsdist --- diff --git a/pdns/dnsdistdist/docs/reference/comboaddress.rst b/pdns/dnsdistdist/docs/reference/comboaddress.rst index b32b42779..fc2a60b4f 100644 --- a/pdns/dnsdistdist/docs/reference/comboaddress.rst +++ b/pdns/dnsdistdist/docs/reference/comboaddress.rst @@ -22,6 +22,18 @@ ComboAddresses can be IPv4 or IPv6, and unless you want to know, you don't need Returns the port number. + .. method:: ComboAddress:ipdecrypt(key) -> ComboAddress + + Decrypt this IP address as described in https://medium.com/@bert.hubert/on-ip-address-encryption-security-analysis-with-respect-for-privacy-dabe1201b476 + + :param string key: A 16 byte key + + .. method:: ComboAddress:ipencrypt(key) -> ComboAddress + + Encrypt this IP address as described in https://medium.com/@bert.hubert/on-ip-address-encryption-security-analysis-with-respect-for-privacy-dabe1201b476 + + :param string key: A 16 byte key + .. method:: ComboAddress:isIPv4() -> bool Returns true if the address is an IPv4, false otherwise diff --git a/pdns/test-ipcrypt_cc.cc b/pdns/test-ipcrypt_cc.cc index b394997ed..dd2d07236 100644 --- a/pdns/test-ipcrypt_cc.cc +++ b/pdns/test-ipcrypt_cc.cc @@ -37,6 +37,7 @@ BOOST_AUTO_TEST_CASE(test_ipcrypt4_vector) BOOST_CHECK_EQUAL(decrypted.toString(), p.first); } + // test from Frank Denis' test.cc ComboAddress ip("192.168.69.42"), out, dec; string key2; for(int n=0; n<16; ++n)