Euclid.Extra.String (Euclid v0.2.4) View Source

Link to this section Summary

Link to this section Functions

Link to this function

inner_truncate(s, max_length)

View Source
Link to this function

secure_compare(left, right)

View Source

Specs

secure_compare(binary(), binary()) :: boolean()

Compares the two binaries in constant-time to avoid timing attacks. See: http://codahale.com/a-lesson-in-timing-attacks/

Link to this function

surround(s, prefix, suffix)

View Source
Link to this function

truncate_at(s, at, limit)

View Source