Good question. There's a build in key generator: http://docs.oracle.com/javase/7/docs/api/javax/crypto/KeyGenerator.html
I meant to write a small main program that would generate the base64 encoded keys for you.