Use fnv1a hashing instead of murmur3.

This commit is contained in:
Dillon Kearns 2022-02-06 13:36:17 -08:00
parent a63eab2dd7
commit e3883e669f
3 changed files with 4 additions and 3 deletions

View File

@ -52,7 +52,7 @@
"justinmimbs/date": "4.0.0 <= v < 5.0.0",
"miniBill/elm-codec": "2.0.0 <= v < 3.0.0",
"noahzgordon/elm-color-extra": "1.0.2 <= v < 2.0.0",
"robinheghan/murmur3": "1.0.0 <= v < 2.0.0",
"robinheghan/fnv1a": "1.0.0 <= v < 2.0.0",
"stil4m/elm-syntax": "7.2.7 <= v < 8.0.0",
"turboMaCk/non-empty-list-alias": "1.2.0 <= v < 2.0.0",
"vito/elm-ansi": "10.0.1 <= v < 11.0.0"

View File

@ -39,6 +39,7 @@
"miniBill/elm-codec": "2.0.0",
"noahzgordon/elm-color-extra": "1.0.2",
"pablohirafuji/elm-syntax-highlight": "3.4.0",
"robinheghan/fnv1a": "1.0.0",
"robinheghan/murmur3": "1.0.0",
"rtfeldman/elm-css": "16.1.1",
"turboMaCk/non-empty-list-alias": "1.2.0",

View File

@ -1,8 +1,8 @@
module Pages.StaticHttp.Request exposing (Request, codec, hash)
import Codec exposing (Codec)
import FNV1a
import Json.Encode as Encode
import Murmur3
import Pages.Internal.StaticHttpBody as StaticHttpBody exposing (Body)
@ -23,7 +23,7 @@ hash requestDetails =
, ( "body", StaticHttpBody.encode requestDetails.body )
]
|> Encode.encode 0
|> Murmur3.hashString 0
|> FNV1a.hash
|> String.fromInt