[{"data":1,"prerenderedAt":663},["ShallowReactive",2],{"navigation_docs":3,"-guide-cli":148,"-guide-cli-surround":658},[4,40],{"title":5,"path":6,"stem":7,"children":8,"icon":39},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31,35],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"Hashing","\u002Fguide\u002Fhashing","1.guide\u002F02.hashing",{"title":16,"path":17,"stem":18},"HMAC and verify","\u002Fguide\u002Fverify","1.guide\u002F03.verify",{"title":20,"path":21,"stem":22},"Salted KDFs","\u002Fguide\u002Fkdf","1.guide\u002F04.kdf",{"title":24,"path":25,"stem":26},"CLI","\u002Fguide\u002Fcli","1.guide\u002F05.cli",{"title":28,"path":29,"stem":30},"Agents","\u002Fguide\u002Fagents","1.guide\u002F06.agents",{"title":32,"path":33,"stem":34},"Custom algorithms","\u002Fguide\u002Fcustom","1.guide\u002F07.custom",{"title":36,"path":37,"stem":38},"Playground","\u002Fguide\u002Fplayground","1.guide\u002F08.playground","i-lucide-book-open",{"title":41,"path":42,"stem":43,"children":44,"icon":147},"Algorithms","\u002Falgorithms","2.algorithms\u002F00.index",[45,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143],{"title":46,"path":42,"stem":43},"Every algorithm",{"title":48,"path":49,"stem":50},"SHA-256","\u002Falgorithms\u002Fsha256","2.algorithms\u002F01.sha256",{"title":52,"path":53,"stem":54},"SHA-384","\u002Falgorithms\u002Fsha384","2.algorithms\u002F02.sha384",{"title":56,"path":57,"stem":58},"SHA-512","\u002Falgorithms\u002Fsha512","2.algorithms\u002F03.sha512",{"title":60,"path":61,"stem":62},"SHA-512Half","\u002Falgorithms\u002Fsha512-half","2.algorithms\u002F04.sha512-half",{"title":64,"path":65,"stem":66},"SHA3-256","\u002Falgorithms\u002Fsha3-256","2.algorithms\u002F05.sha3-256",{"title":68,"path":69,"stem":70},"SHA3-512","\u002Falgorithms\u002Fsha3-512","2.algorithms\u002F06.sha3-512",{"title":72,"path":73,"stem":74},"Keccak-256","\u002Falgorithms\u002Fkeccak256","2.algorithms\u002F07.keccak256",{"title":76,"path":77,"stem":78},"BLAKE2b","\u002Falgorithms\u002Fblake2b","2.algorithms\u002F08.blake2b",{"title":80,"path":81,"stem":82},"BLAKE2b-256","\u002Falgorithms\u002Fblake2b-256","2.algorithms\u002F09.blake2b-256",{"title":84,"path":85,"stem":86},"BLAKE2b-224","\u002Falgorithms\u002Fblake2b-224","2.algorithms\u002F10.blake2b-224",{"title":88,"path":89,"stem":90},"BLAKE2s","\u002Falgorithms\u002Fblake2s","2.algorithms\u002F11.blake2s",{"title":92,"path":93,"stem":94},"BLAKE3","\u002Falgorithms\u002Fblake3","2.algorithms\u002F12.blake3",{"title":96,"path":97,"stem":98},"BLAKE-256","\u002Falgorithms\u002Fblake256","2.algorithms\u002F13.blake256",{"title":100,"path":101,"stem":102},"RIPEMD-160","\u002Falgorithms\u002Fripemd160","2.algorithms\u002F14.ripemd160",{"title":104,"path":105,"stem":106},"HASH160","\u002Falgorithms\u002Fhash160","2.algorithms\u002F15.hash160",{"title":108,"path":109,"stem":110},"HASH256","\u002Falgorithms\u002Fhash256","2.algorithms\u002F16.hash256",{"title":112,"path":113,"stem":114},"MD5","\u002Falgorithms\u002Fmd5","2.algorithms\u002F17.md5",{"title":116,"path":117,"stem":118},"SHA-1","\u002Falgorithms\u002Fsha1","2.algorithms\u002F18.sha1",{"title":120,"path":121,"stem":122},"SHA-0","\u002Falgorithms\u002Fsha0","2.algorithms\u002F19.sha0",{"title":124,"path":125,"stem":126},"CRC-32","\u002Falgorithms\u002Fcrc32","2.algorithms\u002F20.crc32",{"title":128,"path":129,"stem":130},"CRC-16\u002FXMODEM","\u002Falgorithms\u002Fcrc16-xmodem","2.algorithms\u002F21.crc16-xmodem",{"title":132,"path":133,"stem":134},"xxHash (XXH64)","\u002Falgorithms\u002Fxxhash","2.algorithms\u002F22.xxhash",{"title":136,"path":137,"stem":138},"FNV-1a (64-bit)","\u002Falgorithms\u002Ffnv1a","2.algorithms\u002F23.fnv1a",{"title":140,"path":141,"stem":142},"scrypt","\u002Falgorithms\u002Fscrypt","2.algorithms\u002F24.scrypt",{"title":144,"path":145,"stem":146},"PBKDF2","\u002Falgorithms\u002Fpbkdf2","2.algorithms\u002F25.pbkdf2","i-lucide-library",{"id":149,"title":24,"body":150,"description":650,"extension":651,"links":652,"meta":653,"navigation":655,"path":25,"seo":656,"stem":26,"__hash__":657},"docs\u002F1.guide\u002F05.cli.md",{"type":151,"value":152,"toc":643},"minimark",[153,158,205,209,333,347,351,354,410,425,429,444,482,508,511,544,587,591,604,624,639],[154,155,157],"h2",{"id":156},"install-or-run-once","Install or run once",[159,160,165],"pre",{"className":161,"code":162,"language":163,"meta":164,"style":164},"language-bash shiki shiki-themes hashes hashes hashes","npx @agntn\u002Fhashes sha256 \"hello world\"\npnpm add -g @agntn\u002Fhashes   # then plain `hashes`\n","bash","",[166,167,168,187],"code",{"__ignoreMap":164},[169,170,173,177,181,184],"span",{"class":171,"line":172},"line",1,[169,174,176],{"class":175},"sK71F","npx",[169,178,180],{"class":179},"shU9J"," @agntn\u002Fhashes",[169,182,183],{"class":179}," sha256",[169,185,186],{"class":179}," \"hello world\"\n",[169,188,190,193,196,199,201],{"class":171,"line":189},2,[169,191,192],{"class":175},"pnpm",[169,194,195],{"class":179}," add",[169,197,198],{"class":179}," -g",[169,200,180],{"class":179},[169,202,204],{"class":203},"scIB-","   # then plain `hashes`\n",[154,206,208],{"id":207},"commands","Commands",[210,211,212,228],"table",{},[213,214,215],"thead",{},[216,217,218,222,225],"tr",{},[219,220,221],"th",{},"Command",[219,223,224],{},"What it does",[219,226,227],{},"Example",[229,230,231,250,265,280,303,318],"tbody",{},[216,232,233,239,245],{},[234,235,236],"td",{},[166,237,238],{},"hash",[234,240,241,242],{},"Digest of text, or of stdin with ",[166,243,244],{},"-",[234,246,247],{},[166,248,249],{},"hashes hash blake3 - \u003C file.bin",[216,251,252,257,260],{},[234,253,254],{},[166,255,256],{},"hmac",[234,258,259],{},"Keyed digest",[234,261,262],{},[166,263,264],{},"hashes hmac sha256 message secret",[216,266,267,272,275],{},[234,268,269],{},[166,270,271],{},"verify",[234,273,274],{},"Compare with an expected digest, exit 1 if not",[234,276,277],{},[166,278,279],{},"hashes verify md5 hello 5d41402abc4b2a76b9719d911017c592",[216,281,282,287,298],{},[234,283,284],{},[166,285,286],{},"algorithms",[234,288,289,290,293,294,297],{},"The list, ",[166,291,292],{},"-f"," keeps one family, ",[166,295,296],{},"-c"," one category",[234,299,300],{},[166,301,302],{},"hashes algorithms -f sha",[216,304,305,310,313],{},[234,306,307],{},[166,308,309],{},"info",[234,311,312],{},"One algorithm with its options",[234,314,315],{},[166,316,317],{},"hashes info pbkdf2",[216,319,320,325,328],{},[234,321,322],{},[166,323,324],{},"mcp",[234,326,327],{},"The MCP server on stdio",[234,329,330],{},[166,331,332],{},"hashes mcp",[334,335,336,338,339,342,343,346],"p",{},[166,337,238],{}," is the default, so the first word can be the algorithm. ",[166,340,341],{},"hashes md5 hello"," and ",[166,344,345],{},"hashes hash md5 hello"," are the same call.",[154,348,350],{"id":349},"stdout-is-the-digest","Stdout is the digest",[334,352,353],{},"Only the digest goes to stdout, so it pipes and it lands in a variable without trimming:",[159,355,357],{"className":161,"code":356,"language":163,"meta":164,"style":164},"digest=$(hashes sha256 abc)\necho -n abc | hashes sha256 -\n# ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad\n",[166,358,359,383,404],{"__ignoreMap":164},[169,360,361,365,369,372,375,377,380],{"class":171,"line":172},[169,362,364],{"class":363},"s38Sx","digest",[169,366,368],{"class":367},"skH_V","=",[169,370,371],{"class":363},"$(",[169,373,374],{"class":175},"hashes",[169,376,183],{"class":179},[169,378,379],{"class":179}," abc",[169,381,382],{"class":363},")\n",[169,384,385,388,391,393,396,399,401],{"class":171,"line":189},[169,386,387],{"class":175},"echo",[169,389,390],{"class":179}," -n",[169,392,379],{"class":179},[169,394,395],{"class":367}," |",[169,397,398],{"class":175}," hashes",[169,400,183],{"class":179},[169,402,403],{"class":179}," -\n",[169,405,407],{"class":171,"line":406},3,[169,408,409],{"class":203},"# ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad\n",[334,411,412,413,416,417,420,421,424],{},"A KDF's salt and cost go to stderr, since the digest is useless without them. ",[166,414,415],{},"-e binary"," writes the raw bytes, for ",[166,418,419],{},"xxd"," or the next tool in the pipe. Stdin is read byte for byte, so a file hashes the same as ",[166,422,423],{},"sha256sum"," would hash it.",[154,426,428],{"id":427},"flags","Flags",[159,430,432],{"className":161,"code":431,"language":163,"meta":164,"style":164},"hashes hash --help\n",[166,433,434],{"__ignoreMap":164},[169,435,436,438,441],{"class":171,"line":172},[169,437,374],{"class":175},[169,439,440],{"class":179}," hash",[169,442,443],{"class":179}," --help\n",[334,445,446,449,450,453,454,457,458,457,461,464,465,468,469,472,473,342,475,477,478,481],{},[166,447,448],{},"-e, --encoding"," picks the output: ",[166,451,452],{},"hex"," (default), ",[166,455,456],{},"base64",", ",[166,459,460],{},"base64url",[166,462,463],{},"binary",". ",[166,466,467],{},"--input-encoding"," picks how the input is read: ",[166,470,471],{},"utf8"," (default), or ",[166,474,452],{},[166,476,456],{}," for the bytes they spell. ",[166,479,480],{},"--key-encoding"," does the same for the HMAC key.",[159,483,485],{"className":161,"code":484,"language":163,"meta":164,"style":164},"hashes hash160 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 --input-encoding hex\n# 751e76e8199196d454941c45d1b3a323f1433bd6\n",[166,486,487,503],{"__ignoreMap":164},[169,488,489,491,494,497,500],{"class":171,"line":172},[169,490,374],{"class":175},[169,492,493],{"class":179}," hash160",[169,495,496],{"class":179}," 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",[169,498,499],{"class":179}," --input-encoding",[169,501,502],{"class":179}," hex\n",[169,504,505],{"class":171,"line":189},[169,506,507],{"class":203},"# 751e76e8199196d454941c45d1b3a323f1433bd6\n",[334,509,510],{},"Without the flag that same line hashes 66 characters of text, which is a valid digest of the wrong thing. The flag also applies to stdin.",[334,512,513,514,517,518,457,521,457,524,457,527,457,530,457,533,457,536,539,540,543],{},"The rest of the flags come from what the algorithms declare in ",[166,515,516],{},"info().options",": ",[166,519,520],{},"--salt",[166,522,523],{},"--N",[166,525,526],{},"--r",[166,528,529],{},"--p",[166,531,532],{},"--keyLength",[166,534,535],{},"--iterations",[166,537,538],{},"--digest"," for the KDFs, ",[166,541,542],{},"--seed"," for xxHash. The help text names which algorithms take each one. A flag the algorithm doesn't declare is an error, not a digest computed without it:",[159,545,547],{"className":161,"code":546,"language":163,"meta":164,"style":164},"hashes xxhash abc --seed 1\n# bea9ca8199328908\nhashes sha256 abc --seed 1\n# Invalid option seed=1: sha256 takes no parameters\n",[166,548,549,564,569,581],{"__ignoreMap":164},[169,550,551,553,556,558,561],{"class":171,"line":172},[169,552,374],{"class":175},[169,554,555],{"class":179}," xxhash",[169,557,379],{"class":179},[169,559,560],{"class":179}," --seed",[169,562,563],{"class":179}," 1\n",[169,565,566],{"class":171,"line":189},[169,567,568],{"class":203},"# bea9ca8199328908\n",[169,570,571,573,575,577,579],{"class":171,"line":406},[169,572,374],{"class":175},[169,574,183],{"class":179},[169,576,379],{"class":179},[169,578,560],{"class":179},[169,580,563],{"class":179},[169,582,584],{"class":171,"line":583},4,[169,585,586],{"class":203},"# Invalid option seed=1: sha256 takes no parameters\n",[154,588,590],{"id":589},"exit-codes","Exit codes",[334,592,593,596,597,599,600,603],{},[166,594,595],{},"0"," for a digest, and for ",[166,598,271],{}," a match. ",[166,601,602],{},"1"," for a mismatch, and for any error in the input: an unknown name, a bad option, a missing salt. The error is one line on stderr, with no stack trace:",[159,605,607],{"className":161,"code":606,"language":163,"meta":164,"style":164},"hashes sha265 abc\n# Unknown algorithm: sha265. Available: sha256, sha384, sha512, ...\n",[166,608,609,619],{"__ignoreMap":164},[169,610,611,613,616],{"class":171,"line":172},[169,612,374],{"class":175},[169,614,615],{"class":179}," sha265",[169,617,618],{"class":179}," abc\n",[169,620,621],{"class":171,"line":189},[169,622,623],{"class":203},"# Unknown algorithm: sha265. Available: sha256, sha384, sha512, ...\n",[334,625,626,627,630,631,634,635,638],{},"A pipe that closes early (",[166,628,629],{},"| head -1",") ends the process quietly instead of throwing ",[166,632,633],{},"EPIPE"," at you. Colours only show up when both stdout and stderr are terminals that want them, and ",[166,636,637],{},"NO_COLOR"," is respected.",[640,641,642],"style",{},"html pre.shiki code .sK71F, html code.shiki .sK71F{--shiki-light:var(--shiki-token-function);--shiki-default:var(--shiki-token-function);--shiki-dark:var(--shiki-token-function)}html pre.shiki code .shU9J, html code.shiki .shU9J{--shiki-light:var(--shiki-token-string);--shiki-default:var(--shiki-token-string);--shiki-dark:var(--shiki-token-string)}html pre.shiki code .scIB-, html code.shiki .scIB-{--shiki-light:var(--shiki-token-comment);--shiki-default:var(--shiki-token-comment);--shiki-dark:var(--shiki-token-comment)}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s38Sx, html code.shiki .s38Sx{--shiki-light:var(--ui-text-highlighted);--shiki-default:var(--ui-text-highlighted);--shiki-dark:var(--ui-text-highlighted)}html pre.shiki code .skH_V, html code.shiki .skH_V{--shiki-light:var(--shiki-token-keyword);--shiki-default:var(--shiki-token-keyword);--shiki-dark:var(--shiki-token-keyword)}",{"title":164,"searchDepth":189,"depth":189,"links":644},[645,646,647,648,649],{"id":156,"depth":189,"text":157},{"id":207,"depth":189,"text":208},{"id":349,"depth":189,"text":350},{"id":427,"depth":189,"text":428},{"id":589,"depth":189,"text":590},"The hashes command. Hash and HMAC and verify from a shell or stdin with the digest alone on stdout","md",null,{"icon":654},"i-lucide-terminal",true,{"title":24,"description":650},"MeScextxhb8Gj0WCyYgyKujdPHxDDdvloGxmVFZrS6I",[659,661],{"title":20,"path":21,"stem":22,"description":660,"children":-1},"scrypt and PBKDF2 draw a salt when you give none and print it next to the digest. Keep it or the digest is useless",{"title":28,"path":29,"stem":30,"description":662,"children":-1},"The same hash tools over MCP and Pi and OMP and the AI SDK. What they take and what they refuse and what the model reads back",1790688234288]