title: digest function whose output size <= input size
body: <p>I am dealing with fixed length records, with fixed length fields. Some of these fields are sensitive ... think account number. Let's say the account number in my record is defined as a maximum of 19 bytes. I would like to find (or create) a hash of the account number, the result of which itself is no more than 19 bytes. This way, I can still correlate records by this field, the original value not recoverable, and importantly my fixed length record and field size is not changed. Basically, for any field a, f(a) = a' where sizeof(a) == sizeof(a'). Is this possible, even if not cryptographically secure?</p>