List of usage examples for org.bouncycastle.bcpg PublicKeyPacket getEncoded
public byte[] getEncoded() throws IOException
From source file:google.registry.keyring.api.ComparatorKeyring.java
License:Open Source License
@VisibleForTesting static boolean compare(PublicKeyPacket a, PublicKeyPacket b) { if (a == null || b == null) { return a == null && b == null; }/*from w w w . j av a2s . c om*/ try { return Arrays.equals(a.getEncoded(), b.getEncoded()); } catch (IOException e) { logger.severefmt("ComparatorKeyring error: PublicKeyPacket.getEncoded failed: %s", e); return false; } }