Class AesEaxParameters.Builder

  • Enclosing class:
    AesEaxParameters

    public static final class AesEaxParameters.Builder
    extends java.lang.Object
    Builds a new AesEaxParameters instance.
    • Method Detail

      • setKeySizeBytes

        @CanIgnoreReturnValue
        public AesEaxParameters.Builder setKeySizeBytes​(int keySizeBytes)
                                                 throws java.security.GeneralSecurityException
        Accepts key sizes of 16, 24 or 32 bytes. However, some implementation may not support the full set of parameters at the moment and may restrict the key size to 16 or 32-byte values.
        Throws:
        java.security.GeneralSecurityException
      • setIvSizeBytes

        @CanIgnoreReturnValue
        public AesEaxParameters.Builder setIvSizeBytes​(int ivSizeBytes)
                                                throws java.security.GeneralSecurityException
        IV size must be 12 or 16 bytes.
        Throws:
        java.security.GeneralSecurityException
      • setTagSizeBytes

        @CanIgnoreReturnValue
        public AesEaxParameters.Builder setTagSizeBytes​(int tagSizeBytes)
                                                 throws java.security.GeneralSecurityException
        The tag size accepts values between 0 and 16 bytes. However, some implementation may not support the full set of parameters at the moment and may restrict the tag size to a fixed value (i.e. 16 bytes).
        Throws:
        java.security.GeneralSecurityException
      • build

        public AesEaxParameters build()
                               throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException