You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, to use IP-address-anonymization from Netconan externally, you can do something like:
from netconan.ip_anonymization import IpAnonymizer, anonymize_ip_addr
import uuid
salt = str(uuid.uuid4())
anonymizer = IpAnonymizer(salt=salt)
anon_str = anonymize_ip_addr(anonymizer, '1.2.3.4')
But it would be nice to have a better string-based IP-address anonymization interface in the anonymizer objects themselves.
There is an existing method IpAnonymizer.anonymize(addr), but this operates on an unintuitive type (int) and relies on the caller to do all the work (i.e. convert IP address to int, check if the address needs to be anonymized).
The text was updated successfully, but these errors were encountered:
sfraint
changed the title
Better external IP-address-anonymization interface
Better external IP anonymization interface
Oct 31, 2019
Today, to use IP-address-anonymization from
Netconan
externally, you can do something like:But it would be nice to have a better string-based IP-address anonymization interface in the anonymizer objects themselves.
There is an existing method
IpAnonymizer.anonymize(addr)
, but this operates on an unintuitive type (int) and relies on the caller to do all the work (i.e. convert IP address to int, check if the address needs to be anonymized).The text was updated successfully, but these errors were encountered: