Class StreamingAeadKey
- java.lang.Object
-
- com.google.crypto.tink.Key
-
- com.google.crypto.tink.streamingaead.StreamingAeadKey
-
- Direct Known Subclasses:
AesCtrHmacStreamingKey,AesGcmHkdfStreamingKey
public abstract class StreamingAeadKey extends Key
Represents functions to encrypt and decrypt data using a StreamingAead.
-
-
Constructor Summary
Constructors Constructor Description StreamingAeadKey()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.IntegergetIdRequirementOrNull()Returns null if this key has no id requirement, otherwise the required id.abstract StreamingAeadParametersgetParameters()Returns aParametersobject containing all the information about the key which is not randomly chosen.
-
-
-
Method Detail
-
getIdRequirementOrNull
@Nullable public final java.lang.Integer getIdRequirementOrNull()
Description copied from class:KeyReturns null if this key has no id requirement, otherwise the required id.Some keys, when they are in a keyset, are required to have a certain ID to work properly. This comes from the fact that Tink in some cases prefixes ciphertexts or signatures with the string
0x01<id>, where the ID is encoded in big endian (see the documentation of the key type for details), in which case the key requires a certain ID.- Specified by:
getIdRequirementOrNullin classKey
-
getParameters
public abstract StreamingAeadParameters getParameters()
Description copied from class:KeyReturns aParametersobject containing all the information about the key which is not randomly chosen.Implementations need to ensure that
getParameters().hasIdRequirement()returns true if and only ifgetIdRequirementOrNullis non-null.- Specified by:
getParametersin classKey
-
-