Example usage for org.bouncycastle.bcpg BCPGKey getFormat

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

Introduction

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

Prototype

public String getFormat();

Source Link

Document

Return the base format for this key - in the case of the symmetric keys it will generally be raw indicating that the key is just a straight byte representation, for an asymmetric key the format will be PGP, indicating the key is a string of MPIs encoded in PGP 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;
    }// w  w w.  j  a  v  a  2 s.co  m
    return Objects.equals(a.getFormat(), b.getFormat()) && Arrays.equals(a.getEncoded(), b.getEncoded());
}