Additional privacy-preserving features

I’m doing research on Web Metering schemes and planning to use Piwik open source tool for some new privacy-preserving features, possibly as a plugin. I read that Piwik anonymises captured IP addresses, I was wondering how securely this is achieved? Do you use specific hash functions libraries? Any privacy related references would be appreciated.
Thanks in advance