key generator test