NewTokenizationService creates a new tokenization service. Parameters: - encryptionKey []byte: The encryption key used for tokenization. Returns: - *TokenizationService: A new instance of TokenizationService.
(encryptionKey []byte)
| 60 | // Returns: |
| 61 | // - *TokenizationService: A new instance of TokenizationService. |
| 62 | func NewTokenizationService(encryptionKey []byte) *TokenizationService { |
| 63 | enabled := len(encryptionKey) == 32 |
| 64 | |
| 65 | return &TokenizationService{ |
| 66 | key: encryptionKey, |
| 67 | enabled: enabled, |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | // Tokenize converts a PII value to a token using the default standard mode. |
| 72 | // |
no outgoing calls