電子郵件遮罩
在保留網域可見性的同時遮罩本地部分。
電話遮罩
在保留格式與字尾可見性的同時遮罩敏感數字。
建構器式 API
在處理前明確啟用電子郵件/電話遮罩與遮罩字元。
安裝並開始使用
Groovy [planned: Maven Central 0.2.0]: 使用下方目前的安裝方式,載入 Groovy API 並執行最小範例。此範例會明確啟用電子郵件與電話號碼遮罩,並顯示預期輸出。
安裝
git clone --branch v0.2.0 --depth 1 https://github.com/finitefield-org/mask-pii.git
使用方式
example.groovy
import org.finitefield.maskpii.Masker
def masker = new Masker()
.maskEmails()
.maskPhones()
.withMaskChar('#')
def inputText = 'Contact: alice@example.com or 090-1234-5678.'
def output = masker.process(inputText)
println(output)
// => Contact: a####@example.com or ###-####-5678.
注意
請檢視 README ,以取得此語言對應的套件生態系詳情與 API 範例。