Class PredefinedAeadParameters


  • public final class PredefinedAeadParameters
    extends java.lang.Object
    Pre-generated Parameters objects for creating new instances of AeadKey.

    Note: if you want to keep dependencies small, consider inlining the constants here.

    • Field Detail

      • AES128_GCM

        public static final AesGcmParameters AES128_GCM
        A Parameters object for generating new instances of AesGcmKey with the following parameters:
        • Key size: 16 bytes

        On Android KitKat (API level 19), the Aead instance generated by this key template does not support associated data. It might not work at all in older versions.

      • AES256_GCM

        public static final AesGcmParameters AES256_GCM
        A Parameters object for generating new instances of AesGcmKey with the following parameters:
        • Key size: 32 bytes

        On Android KitKat (API level 19), the Aead instance generated by this key template does not support associated data. It might not work at all in older versions.

      • AES128_EAX

        public static final AesEaxParameters AES128_EAX
        A Parameters object for generating new instances of AesEaxKey with the following parameters:
        • Key size: 16 bytes
        • IV size: 16 bytes
      • AES256_EAX

        public static final AesEaxParameters AES256_EAX
        A Parameters object for generating new instances of AesEaxKey with the following parameters:
        • Key size: 32 bytes
        • IV size: 16 bytes
      • AES128_CTR_HMAC_SHA256

        public static final AesCtrHmacAeadParameters AES128_CTR_HMAC_SHA256
        A Parameters object for generating new instances of AesCtrHmacAeadKey with the following parameters:
        • AES key size: 16 bytes
        • AES CTR IV size: 16 byte
        • HMAC key size: 32 bytes
        • HMAC tag size: 16 bytes
        • HMAC hash function: SHA256
      • AES256_CTR_HMAC_SHA256

        public static final AesCtrHmacAeadParameters AES256_CTR_HMAC_SHA256
        A Parameters object for generating new instances of AesCtrHmacAeadKey with the following parameters:
        • AES key size: 32 bytes
        • AES CTR IV size: 16 byte
        • HMAC key size: 32 bytes
        • HMAC tag size: 32 bytes
        • HMAC hash function: SHA256
      • XAES_256_GCM_192_BIT_NONCE

        public static final XAesGcmParameters XAES_256_GCM_192_BIT_NONCE
        A Parameters object for generating new instances of XAesGcmKey. This follows the algorithm defined in the XAES-256-GCM specification
        • Key size: 32 bytes
        • Nonce size: 24 bytes (12 bytes of salt, 12 bytes of AES-GCM IV)
        • Salt size: 12 bytes
        • Tag size: 16 bytes
        • Output prefix: TINK
      • XAES_256_GCM_192_BIT_NONCE_NO_PREFIX

        public static final XAesGcmParameters XAES_256_GCM_192_BIT_NONCE_NO_PREFIX
        A Parameters object for generating new instances of XAesGcmKey. This follows the algorithm defined in the XAES-256-GCM specification
        • Key size: 32 bytes
        • Nonce size: 24 bytes (12 bytes of salt, 12 bytes of AES-GCM IV)
        • Salt size: 12 bytes
        • Tag size: 16 bytes
        • Output prefix: NO_PREFIX
      • XAES_256_GCM_160_BIT_NONCE_NO_PREFIX

        public static final XAesGcmParameters XAES_256_GCM_160_BIT_NONCE_NO_PREFIX
        A Parameters object for generating new instances of XAesGcmKey. This follows the algorithm defined in the XAES-256-GCM specification, except that the nonce size is 160 bits instead of 192 bits. The remaining 4 bytes are padded with zeros.
        • Key size: 32 bytes
        • Nonce size: 20 bytes (8 bytes of salt, 12 bytes of AES-GCM IV)
        • Salt size: 8 bytes
        • Tag size: 16 bytes
        • Output prefix: NO_PREFIX