

import { CredoError } from "../../error/CredoError.mjs";
import "../../error/index.mjs";
import { Sha1 } from "./Sha1.mjs";
import { Sha256 } from "./Sha256.mjs";
import { Sha512 } from "./Sha512.mjs";

//#region src/crypto/hashes/Hasher.ts
var Hasher = class {
	static hash(data, hashName) {
		switch (hashName.toUpperCase()) {
			case "SHA-512": return new Sha512().hash(data);
			case "SHA-256": return new Sha256().hash(data);
			case "SHA-1": return new Sha1().hash(data);
			default: throw new CredoError(`Hash name: '${hashName}' is not supported.`);
		}
	}
};

//#endregion
export { Hasher };
//# sourceMappingURL=Hasher.mjs.map