Example usage for org.bouncycastle.bcpg BCPGKey getEncoded

List of usage examples for org.bouncycastle.bcpg BCPGKey getEncoded

Introduction

In this page you can find the example usage for org.bouncycastle.bcpg BCPGKey getEncoded.

Prototype

public byte[] getEncoded();

Source Link

Document

return a string of bytes giving the encoded format of the key, as described by it's format.

Usage

From source file:google.registry.keyring.api.ComparatorKeyring.java

License:Open Source License

@VisibleForTesting
static boolean compare(BCPGKey a, BCPGKey b) {
    if (a == null || b == null) {
        return a == null && b == null;
    }//from  w  w w  . j  a  v a  2 s .com
    return Objects.equals(a.getFormat(), b.getFormat()) && Arrays.equals(a.getEncoded(), b.getEncoded());
}