Arbitrary generate_key length and no loop