String? publicKeyToHex(PublicKey? pubKey) { return pubKey == null ? null : PDUtil.byteToHex(PublicKeyCoder().encodeToBytes(pubKey)); }