Interface Key

All Known Subinterfaces:
AsymmetricKey, AsymmetricPrivateKey, AsymmetricPublicKey, SymmetricKey
All Known Implementing Classes:
AsymmetricDHKey, AsymmetricDHPrivateKey, AsymmetricDHPublicKey, AsymmetricDSAKey, AsymmetricDSAPrivateKey, AsymmetricDSAPublicKey, AsymmetricDSTU4145Key, AsymmetricDSTU4145PrivateKey, AsymmetricDSTU4145PublicKey, AsymmetricECGOST3410PrivateKey, AsymmetricECGOST3410PublicKey, AsymmetricECKey, AsymmetricECPrivateKey, AsymmetricECPublicKey, AsymmetricEdDSAKey, AsymmetricEdDSAPrivateKey, AsymmetricEdDSAPublicKey, AsymmetricGOST3410Key, AsymmetricGOST3410PrivateKey, AsymmetricGOST3410PublicKey, AsymmetricLMSKey, AsymmetricLMSPrivateKey, AsymmetricLMSPublicKey, AsymmetricRSAKey, AsymmetricRSAPrivateKey, AsymmetricRSAPublicKey, AsymmetricXDHKey, AsymmetricXDHPrivateKey, AsymmetricXDHPublicKey, SymmetricSecretKey

public interface Key
Base interface for keys.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Return true if o is an equivalent key to this.
    The algorithm the key is for.
    int
    Return the hashCode for the key.
  • Method Details

    • getAlgorithm

      Algorithm getAlgorithm()
      The algorithm the key is for.
      Returns:
      the key's algorithm.
    • equals

      boolean equals(Object o)
      Return true if o is an equivalent key to this.
      Overrides:
      equals in class Object
      Parameters:
      o - object to compare to.
      Returns:
      true if o is the same or equivalent key, false otherwise.
    • hashCode

      int hashCode()
      Return the hashCode for the key.
      Overrides:
      hashCode in class Object
      Returns:
      the key's hashCode.