{"version":3,"file":"hash.cjs","names":[],"sources":["../../../../src/rest/commands/utils/hash.ts"],"sourcesContent":["import type { RestCommand } from '../../types.js';\n\n/**\n * Generate a hash for a given string.\n * @param string String to hash.\n * @returns Hashed string.\n */\nexport const generateHash =\n\t<Schema>(string: string): RestCommand<string, Schema> =>\n\t() => ({\n\t\tmethod: 'POST',\n\t\tpath: `/utils/hash/generate`,\n\t\tbody: JSON.stringify({ string }),\n\t});\n\n/**\n * Verify a string with a hash.\n * @param string Source string.\n * @param hash Hash you want to verify against.\n * @returns Boolean.\n */\nexport const verifyHash =\n\t<Schema>(string: string, hash: string): RestCommand<boolean, Schema> =>\n\t() => ({\n\t\tmethod: 'POST',\n\t\tpath: `/utils/hash/verify`,\n\t\tbody: JSON.stringify({ string, hash }),\n\t});\n"],"mappings":"AAOA,MAAa,EACH,QACF,CACN,OAAQ,OACR,KAAM,uBACN,KAAM,KAAK,UAAU,CAAE,SAAQ,CAAC,CAChC,EAQW,GACH,EAAgB,SAClB,CACN,OAAQ,OACR,KAAM,qBACN,KAAM,KAAK,UAAU,CAAE,SAAQ,OAAM,CAAC,CACtC"}