Base64 encoding of a text representation of an IP address and date seems inefficient.
There are 4 octets in a ipv4 address, where each octet is one of 2^8 possible integers. The entire 32-bit ipv4 address space should therefore be possible to encode in 6 characters in base64.
Similarly, a timestamp with a precision/resolution in seconds can generally be represented by a 32-bit integer, at least up through 2038. So that can be represented by another 6 characters.
Or, if you know you’re always going to be encoding these two numbers together, you can put together a 64-bit number and encode that in base64, in just 11 characters. Maybe even use some kind of custom timestamp format that uses fewer bits and counts from a more recent epoch, as an unsigned integer (since you’re not going to have site visitors from the past), and get that down to even fewer characters.
That seems to run less risk of the email address getting cut off at some arbitrary length as it gets passed around.
Base64 encoding of a text representation of an IP address and date seems inefficient.
There are 4 octets in a ipv4 address, where each octet is one of 2^8 possible integers. The entire 32-bit ipv4 address space should therefore be possible to encode in 6 characters in base64.
Similarly, a timestamp with a precision/resolution in seconds can generally be represented by a 32-bit integer, at least up through 2038. So that can be represented by another 6 characters.
Or, if you know you’re always going to be encoding these two numbers together, you can put together a 64-bit number and encode that in base64, in just 11 characters. Maybe even use some kind of custom timestamp format that uses fewer bits and counts from a more recent epoch, as an unsigned integer (since you’re not going to have site visitors from the past), and get that down to even fewer characters.
That seems to run less risk of the email address getting cut off at some arbitrary length as it gets passed around.