random key generator uses urandom instead of random