gitfoss | d8c0b8e9f95a4056d0200a5edd32cec277d798f7 | 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;