File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,8 @@ func (h *HashID) EncodeInt64(numbers []int64) (string, error) {
223223// EncodeHex hashes a hexadecimal string to a string containing at least MinLength characters taken from the Alphabet.
224224// A hexadecimal string should not contain the 0x prefix.
225225// Use DecodeHex using the same Alphabet and Salt to get back the hexadecimal string.
226+ //
227+ // Each hex nibble is encoded as an integer in range [16, 31].
226228func (h * HashID ) EncodeHex (hex string ) (string , error ) {
227229 nums := make ([]int , len (hex ))
228230
@@ -329,6 +331,8 @@ func (h *HashID) DecodeInt64WithError(hash string) ([]int64, error) {
329331
330332// DecodeHex unhashes the string passed to a hexadecimal string.
331333// It is symmetric with EncodeHex if the Alphabet and Salt are the same ones which were used to hash.
334+ //
335+ // Each hex nibble is decoded from an integer in range [16, 31].
332336func (h * HashID ) DecodeHex (hash string ) (string , error ) {
333337 numbers , err := h .DecodeInt64WithError (hash )
334338 if err != nil {
You can’t perform that action at this time.
0 commit comments