Added generatePrivateKey to library