def METHOD_NAME(
    self, values: Optional[List[str]], request_id: Optional[str]
) -> Optional[List[Optional[str]]]:
    if values is None:
        return None
    if self.mode == AesEncryptionMaskingConfiguration.Mode.GCM:
        masking_meta: Dict[
            SecretType, MaskingSecretMeta
        ] = self._build_masking_secret_meta()
        key: bytes | None = SecretsUtil.get_or_generate_secret(
            request_id, SecretType.key, masking_meta[SecretType.key]
        )
        key_hmac: str | None = SecretsUtil.get_or_generate_secret(
            request_id,
            SecretType.key_hmac,
            masking_meta[SecretType.key_hmac],
        )
        # The nonce is generated deterministically such that the same input val will result in same nonce
        # and therefore the same masked val through the aes strategy. This is called convergent encryption, with this
        # implementation loosely based on https://www.vaultproject.io/docs/secrets/transit#convergent-encryption
        masked_values: List[Optional[str]] = []
        for value in values:
            if value is None:
                masked_values.append(None)
                continue
            nonce: bytes | None = self._generate_nonce(
                str(value), key_hmac, request_id, masking_meta  # type: ignore
            )
            masked: str = encrypt(str(value), key, nonce)  # type: ignore
            if self.format_preservation is not None:
                formatter = FormatPreservation(self.format_preservation)
                masked = formatter.format(masked)
            masked_values.append(masked)
        return masked_values
    raise ValueError(f"aes_mode {self.mode} is not supported")