Is this sufficient for IPv6? See http://stackoverflow.com/questions/6098517/anonymizing-ipv6-addresses

Might be worth being more explicit.