Code example for KeyPair

Methods: getPrivategetPublic

0
	 
	public void salvar(){ 
		System.out.println("data:"+funcionario.getDataAdmissao());
		KeyPairGenerator kg = KeyPairGenerator.getInstance("RSA");
		KeyPair kp = kg.generateKeyPair();
		PublicKey puk = kp.getPublic();
		PrivateKey prk = kp.getPrivate();
		puk.getEncoded();
	} 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE