added a setPrivateKey() api and clarified the documentation