Logging IP address for uniqueness without storing the IP address itself for privacy

Posted by szabgab on Stack Overflow See other posts from Stack Overflow or by szabgab
Published on 2010-12-29T08:27:33Z Indexed on 2010/12/29 8:54 UTC
Read the original article Hit count: 704

Filed under:
|
|
|
|

In a web application when logging some data I'd like to make sure I can identify data that came at differetn times but from the same IP address. On the other hand for privacy concerns as the data will be released publicly I'd like to make sure the actual IP cannot be retrieved. So I need some one way mapping of the IP addresses to some other strings that ensures 1-1 mapping.

If I understand correctly then MD5, SHA1 or SHA256 could be a solution. I wonder if they are not too expensive in terms of processing needed?

I'd be interested in any solution though if there is implementation in Perl that would be even better.

© Stack Overflow or respective owner

Related posts about perl

Related posts about hash