public AesGcmSivParameters build() throws GeneralSecurityException {
      if (keySizeBytes == null) {
        throw new GeneralSecurityException("Key size is not set");
      }
      if (variant == null) {
        throw new GeneralSecurityException("Variant is not set");
      }
      return new AesGcmSivParameters(keySizeBytes, variant);
    }
Accepts key sizes of 16 and 32 bytes.
java_src/src/main/java/com/google/crypto/tink/aead/AesGcmSivParameters.java