You can easily precompute the SHA256 hashes of all IP addresses and do a simple JOIN to get the original IPs.
I am concerned for you OP.