Krug.CipherUtil (Krug v2.0.27) View Source

Utilitary module for get help on cipher operations.

Link to this section Summary

Functions

Calculates the unique number from a string.

Link to this section Functions

Link to this function

calculate_string_value(string, skip_verification \\ false)

View Source

Calculates the unique number from a string.

You could use "skip_verification" parameter as true, if you are sure that values already were verified (not nil/empty and not need be trimmed), this will improve performance.

Examples

iex > Krug.CipherUtil.calculate_string_value(nil)
0
iex > Krug.CipherUtil.calculate_string_value("")
0
iex > Krug.CipherUtil.calculate_string_value(" ")
0
iex > Krug.CipherUtil.calculate_string_value("A")
130
iex > Krug.CipherUtil.calculate_string_value("echo.ping@blabla.com")
217583302
iex > Krug.CipherUtil.calculate_string_value("jhon.titor@timetraveler.com")
28001410572