Class PgpKeyId

java.lang.Object
org.gradle.plugins.signing.signatory.pgp.PgpKeyId
All Implemented Interfaces:
Comparable<PgpKeyId>

public class PgpKeyId extends Object implements Comparable<PgpKeyId>
A normalised form for keys, which are friendliest for users as hex strings but used internally as longs.
Since:
1.0
  • Constructor Details

    • PgpKeyId

      public PgpKeyId(long keyId)
      Creates a new PgpKeyId.
      Since:
      1.0
    • PgpKeyId

      public PgpKeyId(org.bouncycastle.openpgp.PGPPublicKey keyId)
      Creates a new PgpKeyId.
      Since:
      1.0
    • PgpKeyId

      public PgpKeyId(org.bouncycastle.openpgp.PGPSignature signature)
      Creates a new PgpKeyId.
      Since:
      1.0
    • PgpKeyId

      public PgpKeyId(String keyId)
      Creates a new PgpKeyId.
      Since:
      1.0
  • Method Details

    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(PgpKeyId other)
      Specified by:
      compareTo in interface Comparable<PgpKeyId>
    • getAsHex

      public final String getAsHex()
      Returns the as hex.
      Since:
      1.0
    • getAsLong

      public final long getAsLong()
      Returns the as long.
      Since:
      1.0
    • toHex

      public static String toHex(long keyId)
      To hex.
      Since:
      1.0
    • toLong

      public static long toLong(String keyId)
      To long.
      Since:
      1.0