[{"name":"IsPasswordKnown","comment":" This package checks a given password against the public API of haveibeenpwned.com\n\nA typical use would look like this:\n\n    requestPassword : String -> Cmd Msg\n    requestPassword pass =\n        pass\n            |> hashAndCut\n            |> Debug.log \"This will be sent to HaveIBeenPawned.com\"\n            |> requestPossibleMatches\n            |> Http.send PasswordResponse\n\nThe reason that `hashAndCut` is separate from `requestPossibleMatches` is so that\nthe developer can easily inspect that the password does not actually get passed\nto the request, only the first five digets of it's hash\n\n\n# Generate the request to the API\n\n@docs hashAndCut, requestPossibleMatches\n\n\n# Check the returned list for a match\n\n@docs isPasswordKnown, IsPasswordKnown\n\n","unions":[{"name":"IsPasswordKnown","comment":" Possible results of a request to the HaveIBeenPawned API.\nNote that it does not matter how often a password was found in breaches:\nI it was found even once, it is on lists that are used in actual attacks!\n","args":[],"cases":[["PasswordUnknown",[]],["FoundInBreachedDataTimes",["Basics.Int"]]]}],"aliases":[],"values":[{"name":"hashAndCut","comment":" Hash your password and take only the first 5 characters. This is the only\nexposed function to create a password so you don't send your any passwords\nby accident.\n\n    requestPassword : String -> Cmd Msg\n    requestPassword pass =\n        pass\n            |> hashAndCut\n            |> Debug.log \"This will be sent to HaveIBeenPawned.com\"\n            |> requestPossibleMatches\n            |> Http.send PasswordResponse\n\n","type":"String.String -> IsPasswordKnown.Password"},{"name":"isPasswordKnown","comment":" This takes the password and the result of the http request done before.\nIf the http request errored, the error is retuned in the result\n","type":"String.String -> Result.Result Http.Error String.String -> Result.Result Http.Error IsPasswordKnown.IsPasswordKnown"},{"name":"requestPossibleMatches","comment":" Turn the previously hased password into a request to the API of HaveIBeenPawned.com.\nBecause the password is hashed and limited to 5 characters, a potential Man-in-the-middle cannot easily capture\nthe password.\n","type":"IsPasswordKnown.Password -> Http.Request String.String"}],"binops":[]}]