Implemented random key generator