Class AesCtrHmacStreamingParameters.Builder
- java.lang.Object
-
- com.google.crypto.tink.streamingaead.AesCtrHmacStreamingParameters.Builder
-
- Enclosing class:
- AesCtrHmacStreamingParameters
public static final class AesCtrHmacStreamingParameters.Builder extends java.lang.ObjectHelps creating newAesCtrHmacStreamingParametersobjects..
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AesCtrHmacStreamingParametersbuild()Checks restrictions as on the devsiteAesCtrHmacStreamingParameters.BuildersetCiphertextSegmentSizeBytes(int ciphertextSegmentSizeBytes)Sets the size of a segment.AesCtrHmacStreamingParameters.BuildersetDerivedKeySizeBytes(int derivedKeySizeBytes)Sets the size of the AES GCM key which will internally be derived.AesCtrHmacStreamingParameters.BuildersetHkdfHashType(AesCtrHmacStreamingParameters.HashType hkdfHashType)Sets the type of the hash function used in HKDF.AesCtrHmacStreamingParameters.BuildersetHmacHashType(AesCtrHmacStreamingParameters.HashType hmacHashType)Sets the type of the hash function used in the HMAC.AesCtrHmacStreamingParameters.BuildersetHmacTagSizeBytes(java.lang.Integer hmacTagSizeBytes)Sets the size of the Hmac tag used.AesCtrHmacStreamingParameters.BuildersetKeySizeBytes(int keySizeBytes)Sets the size of the initial key material (used as input to HKDF).
-
-
-
Method Detail
-
setKeySizeBytes
@CanIgnoreReturnValue public AesCtrHmacStreamingParameters.Builder setKeySizeBytes(int keySizeBytes)
Sets the size of the initial key material (used as input to HKDF).Must be at least 16, and at least equal to the value set in
setDerivedKeySizeBytes(int)
-
setDerivedKeySizeBytes
@CanIgnoreReturnValue public AesCtrHmacStreamingParameters.Builder setDerivedKeySizeBytes(int derivedKeySizeBytes)
Sets the size of the AES GCM key which will internally be derived.Must be 16 or 32.
-
setHkdfHashType
@CanIgnoreReturnValue public AesCtrHmacStreamingParameters.Builder setHkdfHashType(AesCtrHmacStreamingParameters.HashType hkdfHashType)
Sets the type of the hash function used in HKDF.
-
setHmacHashType
@CanIgnoreReturnValue public AesCtrHmacStreamingParameters.Builder setHmacHashType(AesCtrHmacStreamingParameters.HashType hmacHashType)
Sets the type of the hash function used in the HMAC.
-
setHmacTagSizeBytes
@CanIgnoreReturnValue public AesCtrHmacStreamingParameters.Builder setHmacTagSizeBytes(java.lang.Integer hmacTagSizeBytes)
Sets the size of the Hmac tag used.
-
setCiphertextSegmentSizeBytes
@CanIgnoreReturnValue public AesCtrHmacStreamingParameters.Builder setCiphertextSegmentSizeBytes(int ciphertextSegmentSizeBytes)
Sets the size of a segment.Must be at least equal 24 plus the value set in
setDerivedKeySizeBytes(int), and less than 2^31.
-
build
public AesCtrHmacStreamingParameters build() throws java.security.GeneralSecurityException
Checks restrictions as on the devsite- Throws:
java.security.GeneralSecurityException
-
-