gitfoss-fork | 445ac3024620afccfb1669497ca7aead182d9296 | 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;