Simple hash function to implement on a microcontroller
CRC32 would do the job if you don't need cryptographic security. It gives you a 32-bit output value, and only requires simple operations. Plenty of implementations out there for most major micro families, too. Split down to 4 bytes and do modulus on a 32-character alphabet (1-9 A-Z, skipping a few chars like I and J) for each, and there's your code.