

const require_CredoError = require('../../error/CredoError.js');
require('../../error/index.js');
const require_Sha1 = require('./Sha1.js');
const require_Sha256 = require('./Sha256.js');
const require_Sha512 = require('./Sha512.js');

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

//#endregion
exports.Hasher = Hasher;