MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / NewTokenizationService

Function NewTokenizationService

internal/tokenization/tokenization.go:62–69  ·  view source on GitHub ↗

NewTokenizationService creates a new tokenization service. Parameters: - encryptionKey []byte: The encryption key used for tokenization. Returns: - *TokenizationService: A new instance of TokenizationService.

(encryptionKey []byte)

Source from the content-addressed store, hash-verified

60// Returns:
61// - *TokenizationService: A new instance of TokenizationService.
62func 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//

Calls

no outgoing calls

Tested by 10

TestDetokenizeWithModeFunction · 0.68
TestKeySizeFunction · 0.68
TestInvalidKeySizeFunction · 0.68
TestUTF8TokenizationFunction · 0.68