View Source Rivet.Utils.Redact (rivet_utils v2.0.1)

redact text based on common patterns for insecure data

Contributor: Unknown

Summary

Functions

iex> redact_string("this password:Frieb398f3e is nice") "this password: is nice" iex> redact_string("this password:\"Frieb398f3e\" is nice") "this password: is nice" iex> redact_string("this password=Frieb398f3e is nice") "this password= is nice" iex> redact_string("this password=\"Frieb398f3e\" is nice") "this password= is nice" iex> redact_string("this password: Frieb398f3e is nice") "this password: is nice" iex> redact_string("this password: \"Frieb398f3e\" is nice") "this password: is nice" iex> redact_string("this password = Frieb398f3e is nice") "this password= is nice" iex> redact_string("this password = \"Frieb398f3e\" is nice") "this password= is nice" iex> redact_string("this key: <<10, 20, 30>> is nice") "this key: is nice" iex> redact_string("curve_publickey: <<142, 243, 120, 122, ...>>, curve_secretkey: <<97, 10, 116, 57, 7, 84, 65, 254, 83, 106>>,") "curve_publickey:, curve_secretkey:*,"

Functions

@spec redact_string(message :: String.t()) :: String.t()

iex> redact_string("this password:Frieb398f3e is nice") "this password: is nice" iex> redact_string("this password:\"Frieb398f3e\" is nice") "this password: is nice" iex> redact_string("this password=Frieb398f3e is nice") "this password= is nice" iex> redact_string("this password=\"Frieb398f3e\" is nice") "this password= is nice" iex> redact_string("this password: Frieb398f3e is nice") "this password: is nice" iex> redact_string("this password: \"Frieb398f3e\" is nice") "this password: is nice" iex> redact_string("this password = Frieb398f3e is nice") "this password= is nice" iex> redact_string("this password = \"Frieb398f3e\" is nice") "this password= is nice" iex> redact_string("this key: <<10, 20, 30>> is nice") "this key: is nice" iex> redact_string("curve_publickey: <<142, 243, 120, 122, ...>>, curve_secretkey: <<97, 10, 116, 57, 7, 84, 65, 254, 83, 106>>,") "curve_publickey:, curve_secretkey:*,"