Here you can find the source of getPublicBytes(KeyPair keyPair)
private static byte[] getPublicBytes(KeyPair keyPair)
//package com.java2s; //License from project: Apache License import java.security.KeyPair; public class Main { private static byte[] getPublicBytes(KeyPair keyPair) { return keyPair.getPublic().getEncoded(); }/*from w w w.j av a 2s . com*/ }