Class OpenPgpV4Fingerprint

  • All Implemented Interfaces:
    java.lang.CharSequence, java.lang.Comparable<OpenPgpFingerprint>

    public class OpenPgpV4Fingerprint
    extends OpenPgpFingerprint
    This class represents a hex encoded, uppercase OpenPGP v4 fingerprint.
    • Constructor Detail

      • OpenPgpV4Fingerprint

        public OpenPgpV4Fingerprint​(@Nonnull
                                    byte[] bytes)
      • OpenPgpV4Fingerprint

        public OpenPgpV4Fingerprint​(@Nonnull
                                    org.bouncycastle.openpgp.PGPPublicKey key)
      • OpenPgpV4Fingerprint

        public OpenPgpV4Fingerprint​(@Nonnull
                                    org.bouncycastle.openpgp.PGPSecretKey key)
      • OpenPgpV4Fingerprint

        public OpenPgpV4Fingerprint​(@Nonnull
                                    org.bouncycastle.openpgp.PGPPublicKeyRing ring)
      • OpenPgpV4Fingerprint

        public OpenPgpV4Fingerprint​(@Nonnull
                                    org.bouncycastle.openpgp.PGPSecretKeyRing ring)
      • OpenPgpV4Fingerprint

        public OpenPgpV4Fingerprint​(@Nonnull
                                    org.bouncycastle.openpgp.PGPKeyRing ring)
    • Method Detail

      • isValid

        protected boolean isValid​(@Nonnull
                                  java.lang.String fp)
        Description copied from class: OpenPgpFingerprint
        Check, whether the fingerprint consists of 40 valid hexadecimal characters.
        Specified by:
        isValid in class OpenPgpFingerprint
        Parameters:
        fp - fingerprint to check.
        Returns:
        true if fingerprint is valid.
      • prettyPrint

        public java.lang.String prettyPrint()
        Description copied from class: OpenPgpFingerprint
        Return a pretty printed representation of the fingerprint.
        Specified by:
        prettyPrint in class OpenPgpFingerprint
        Returns:
        pretty printed fingerprint
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toUri

        public java.net.URI toUri()
        Return the fingerprint as an openpgp4fpr URI. An example would be 'openpgp4fpr:7F9116FEA90A5983936C7CFAA027DB2F3E1E118A'.
        Returns:
        openpgp4fpr fingerprint uri
        See Also:
        openpgp4fpr URI scheme