Code example for ECPublicKey

Methods: getW

0
	public void testRecoverKeyPair_Ec() throws Exception { 
		KeyPair kp = PubkeyUtils.recoverKeyPair(EC_KEY_PKCS8);
 
		ECPublicKey pubKey = (ECPublicKey) kp.getPublic();
 
		assertEquals(EC_KEY_pub_x, pubKey.getW().getAffineX());
		assertEquals(EC_KEY_pub_y, pubKey.getW().getAffineY());
	} 
 
	private static class MyPrivateKey implements PrivateKey {
		public String getAlgorithm() {
			throw new UnsupportedOperationException();
		} 
 
		public byte[] getEncoded() { 
			throw new UnsupportedOperationException();
		} 
 
		public String getFormat() {
			throw new UnsupportedOperationException();
		}