Example usage for org.bouncycastle.openpgp PGPPrivateKey getPrivateKeyDataPacket

List of usage examples for org.bouncycastle.openpgp PGPPrivateKey getPrivateKeyDataPacket

Introduction

In this page you can find the example usage for org.bouncycastle.openpgp PGPPrivateKey getPrivateKeyDataPacket.

Prototype

public BCPGKey getPrivateKeyDataPacket() 

Source Link

Document

Return the private key packet associated with this private key, if available.

Usage

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

License:Open Source License

@VisibleForTesting
static boolean compare(@Nullable PGPPrivateKey a, @Nullable PGPPrivateKey b) {
    if (a == null || b == null) {
        return a == null && b == null;
    }//from w  w w. ja  v  a  2s . c  o  m
    return a.getKeyID() == b.getKeyID() && compare(a.getPrivateKeyDataPacket(), b.getPrivateKeyDataPacket())
            && compare(a.getPublicKeyPacket(), b.getPublicKeyPacket());
}