Documentation ¶
Overview ¶
Package homographhardened provides escape functions to thwart homograph attacks. It may be used to display untrusted information to a human recipient whilst still being recoverable (though one caveat is that e.g. shell piping may require an additional unescaping; yet e.g. newlines inside a "Subject:" lines will Line-escaped yield to a singular line). As such, a list of Line images may be injectively catenated with a newline, a list of Word images may be injectively catenated with a space. homographhardened MUST NOT be used for domain-specific escaping such as XML or query languages, as their semantics differ from HomographHardened attack scenario. (That is, "<" has herein no special meaning as it does not constitute a homograph attack). However, quotes are escaped. Line and Word does not add quote markers. Line and Word are injective on all byte slices (i.e. even on non-UTF8- valid strings). homographhardened is currently optimised for English, German and French.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Line ¶
Line escapes a string to both be homograph-hardened and make '\n'-catenation injective. Line is injective.
Types ¶
This section is empty.