Class AesGcmHkdfStreamingParameters.Builder
- java.lang.Object
-
- com.google.crypto.tink.streamingaead.AesGcmHkdfStreamingParameters.Builder
-
- Enclosing class:
- AesGcmHkdfStreamingParameters
public static final class AesGcmHkdfStreamingParameters.Builder extends java.lang.ObjectHelps creating newAesGcmHkdfStreamingParametersobjects.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AesGcmHkdfStreamingParametersbuild()Checks restrictions as on the devsiteAesGcmHkdfStreamingParameters.BuildersetCiphertextSegmentSizeBytes(int ciphertextSegmentSizeBytes)Sets the size of a segment.AesGcmHkdfStreamingParameters.BuildersetDerivedAesGcmKeySizeBytes(int derivedAesGcmKeySizeBytes)Sets the size of the AES GCM key which will internally be derived.AesGcmHkdfStreamingParameters.BuildersetHkdfHashType(AesGcmHkdfStreamingParameters.HashType hkdfHashType)Sets the type of the hash function used in HKDF.AesGcmHkdfStreamingParameters.BuildersetKeySizeBytes(int keySizeBytes)Sets the size of the initial key material (used as input to HKDF).
-
-
-
Method Detail
-
setKeySizeBytes
@CanIgnoreReturnValue public AesGcmHkdfStreamingParameters.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
setDerivedAesGcmKeySizeBytes(int)
-
setDerivedAesGcmKeySizeBytes
@CanIgnoreReturnValue public AesGcmHkdfStreamingParameters.Builder setDerivedAesGcmKeySizeBytes(int derivedAesGcmKeySizeBytes)
Sets the size of the AES GCM key which will internally be derived.Must be 16 or 32.
-
setHkdfHashType
@CanIgnoreReturnValue public AesGcmHkdfStreamingParameters.Builder setHkdfHashType(AesGcmHkdfStreamingParameters.HashType hkdfHashType)
Sets the type of the hash function used in HKDF.
-
setCiphertextSegmentSizeBytes
@CanIgnoreReturnValue public AesGcmHkdfStreamingParameters.Builder setCiphertextSegmentSizeBytes(int ciphertextSegmentSizeBytes)
Sets the size of a segment.Must be at least equal 24 plus the value set in
setDerivedAesGcmKeySizeBytes(int), and less than 2^31.
-
build
public AesGcmHkdfStreamingParameters build() throws java.security.GeneralSecurityException
Checks restrictions as on the devsite- Throws:
java.security.GeneralSecurityException
-
-