gitfoss-fork-fork | a2f58b50019904ecb5048350d3f2d94d697905ea | app/services/crypto/computeHash.ts ∙ GitFOSS
.ts
TypeScript
(application/typescript)
// 1st-party
import { ServiceMethodFactory } from "@ethicdevs/react-monolith";
// app
import { CryptoServiceDeps } from "./types";

const makeComputeHash: ServiceMethodFactory<
  CryptoServiceDeps,
  [string, string],
  string
> = (deps) => {
  return (strToHash, salt) => {
    return deps.hash(strToHash, salt);
  };
};

export default makeComputeHash;