question: public static byte [ ] generateX509PublicKey ( PublicKey publicKey ) throws Exception { X509EncodedKeySpec x509EncodedPublicKey = KEY_FACTORY . getKeySpec ( publicKey , X509EncodedKeySpec . class ) ; return x509EncodedPublicKey . getEncoded ( ) ; }
target:  Generates X509 encoded public key bytes from a given public key.