gitfoss | 8758f266e6fc1df0cd9d5676f776e76e147e4ae1 | 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;