Interface ITokenizationProvider


public interface ITokenizationProvider
This interface implements the conversion of non-tokenized strings into tokens, and vice versa.
Since:
2025.05
  • Method Details

    • tokenize

      Performs tokenization for a collection of requests. This method is invoked when Smile CDR needs to convert one or more strings into their corresponding tokens. The algorithm used to tokenize is flexible, and could rely on an external database or a cryptographic algorithm (or both). It must however be deterministic, meaning that repeated calls to tokenize the same input string must produce the same result.
      Parameters:
      theRequestDetails - The request associated with the tokenization
      theRequests - The requests, which include the specific rule as well as the object being tokenized
      Returns:
      Returns a collection of tokenized results. A result must be provided for every request in the request object.
    • detokenize

      Performs de-tokenization for a collection of requests. This method will be provided a collection of tokens originally obtained by invoking tokenize(RequestDetails, TokenizationRequests), and should supply the same input string. This method will not be called if none of the configured tokenization rules allow for de-tokenization, in which case this method may simply throw a UnsupportedOperationException.
      Parameters:
      theRequestDetails - The request associated with the tokenization
      theRequests - The requests, which include the specific rule as well as the token being detokenized
      Returns:
      Returns a collection of detokenized results. A result must be provided for every request in the request object.