Function randId

Generates a random string of a fixed length.

IMPORTANT: This is not suitable for cryptographic applications.