Generic KeyGenerator