Package com.google.crypto.tink.tinkkey
Interface TinkKey
-
- All Known Implementing Classes:
ProtoKey
@Immutable public interface TinkKeyTinkKeyrepresents how Tink views individual keys. In contrast,KeysetHandleonly provides access to aKeyset, which represents multiple keys.A
TinkKeycontains the data associated to a type of key and provides ways of getting that data. TheTinkKeyinterface does not specify how the key data is represented nor how it provides access to the data.Do not use this in new code. Instead, use
Key.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KeyTemplategetKeyTemplate()ATinkKeyshould know theKeyTemplatefrom which it was generated, which in turn specifies the cryptographic algorithm in which theTinkKeyshould be used.booleanhasSecret()Returns true if the key contains secret key material, and false otherwise.
-
-
-
Method Detail
-
hasSecret
boolean hasSecret()
Returns true if the key contains secret key material, and false otherwise.
-
getKeyTemplate
KeyTemplate getKeyTemplate()
ATinkKeyshould know theKeyTemplatefrom which it was generated, which in turn specifies the cryptographic algorithm in which theTinkKeyshould be used. Throws UnsupportedOperationException to help ease rollout until it is possible to easily find the KeyTemplate associated to a key described in proto- Returns:
- the
KeyTemplateused to generate the key. - Throws:
java.lang.UnsupportedOperationException- if theTinkKeydoes not yet support returning itsKeyTemplate
-
-