Class AesCtrHmacStreamingKey
- java.lang.Object
-
- com.google.crypto.tink.Key
-
- com.google.crypto.tink.streamingaead.StreamingAeadKey
-
- com.google.crypto.tink.streamingaead.AesCtrHmacStreamingKey
-
public final class AesCtrHmacStreamingKey extends StreamingAeadKey
Represents a StreamingAead functions.See https://developers.google.com/tink/streaming-aead/aes_gcm_hkdf_streaming.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AesCtrHmacStreamingKeycreate(AesCtrHmacStreamingParameters parameters, SecretBytes initialKeymaterial)booleanequalsKey(Key o)Returns true if the key is guaranteed to be equal toother.SecretBytesgetInitialKeyMaterial()AesCtrHmacStreamingParametersgetParameters()Returns aParametersobject containing all the information about the key which is not randomly chosen.-
Methods inherited from class com.google.crypto.tink.streamingaead.StreamingAeadKey
getIdRequirementOrNull
-
-
-
-
Method Detail
-
create
public static AesCtrHmacStreamingKey create(AesCtrHmacStreamingParameters parameters, SecretBytes initialKeymaterial) throws java.security.GeneralSecurityException
- Throws:
java.security.GeneralSecurityException
-
getInitialKeyMaterial
public SecretBytes getInitialKeyMaterial()
-
getParameters
public AesCtrHmacStreamingParameters 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 classStreamingAeadKey
-
equalsKey
public boolean equalsKey(Key o)
Description copied from class:KeyReturns true if the key is guaranteed to be equal toother.Implementations are required to do this in constant time.
Note: this is allowed to return false even if two keys are guaranteed to represent the same function, but are represented differently. For example, a key is allowed to internally store the number of zero-bytes used as padding when a large number is represented as a byte array, and use this in the comparison.
Note: Tink
Keyobjects should typically not overridehashCode(because it could risk leaking key material). Hence, they typically also should not overrideequals.
-
-