by Ricardo Fernández Serrata
Simple Pseudo-Random Number Generator based on MD5 and XOR. It uses XOR to truncate the MD5 digest to 32b/4B/8 hex-chars by "consuming" all Bytes to ensure that no data is discarded.
The period length is very likely to be 2^32 - 1 but I haven't tested it.
This PRNG is NOT cryptographically secure since MD5 is not secure. I only used MD5 because it's more random than CRC32.
All AM hash functions read input as UTF-8, but AM and Java use UTF-16 natively, this is the reason why I use `md5(hexEncode(s, "UTF-16BE"), "h")`, to make the hash correct, and to support All Unicode chars.
To get Truly Random numbers without a server, use: llamalab.com/automate/community/flows/39114
Rate and review within the app in the Community section.