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

Method TokenizeAllPII

identity.go:321–327  ·  view source on GitHub ↗

TokenizeAllPII tokenizes all eligible PII fields in an identity. Parameters: - identityID string: The ID of the identity. Returns: - error: An error if any field could not be tokenized.

(identityID string)

Source from the content-addressed store, hash-verified

319// Returns:
320// - error: An error if any field could not be tokenized.
321func (l *LedgerForge) TokenizeAllPII(identityID string) error {
322 for _, field := range tokenization.TokenizableFields {
323 // Ignore errors for fields that might already be tokenized
324 _ = l.TokenizeIdentityField(identityID, field)
325 }
326 return nil
327}
328
329// GetDetokenizedIdentity returns a copy of the identity with all fields detokenized.
330// Note: This does not modify the stored identity.

Callers 1

TestTokenizeAllPIIFunction · 0.95

Calls 1

TokenizeIdentityFieldMethod · 0.95

Tested by 1

TestTokenizeAllPIIFunction · 0.76