Class KeysetHandle.Entry

  • All Implemented Interfaces:
    KeysetHandleInterface.Entry
    Enclosing class:
    KeysetHandle

    @Immutable
    public static final class KeysetHandle.Entry
    extends java.lang.Object
    implements KeysetHandleInterface.Entry
    Represents a single entry in a keyset.

    An entry in a keyset consists of a key, its ID, and the KeyStatus. In addition, there is one key marked as a primary.

    The ID should be considered unique (though currently Tink still accepts keysets with repeated IDs). The KeyStatus tells Tink whether the key should still be used or not. There should always be exactly one key which is marked as a primary, however, at the moment Tink still accepts keysets which have none. This will be changed in the future.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getId()  
      Key getKey()
      May return an internal class LegacyProtoKey in case there is no implementation of the corresponding key class yet.
      KeyStatus getStatus()  
      boolean isPrimary()
      Guaranteed to be true in exactly one entry.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait