added a random string function

Signed-off-by: Alexander Skjolden <alex@plastboks.net>