

const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.js');
const require_Sha1 = require('../../hashes/Sha1.js');
require('../../hashes/index.js');
let webcrypto_core = require("webcrypto-core");
webcrypto_core = require_rolldown_runtime.__toESM(webcrypto_core);

//#region src/crypto/webcrypto/providers/CredoSha1Provider.ts
var CredoSha1Provider = class extends webcrypto_core.ProviderCrypto {
	constructor(..._args) {
		super(..._args);
		this.name = "SHA-1";
		this.usages = [];
	}
	async onDigest(algorithm, data) {
		switch (algorithm.name.toUpperCase()) {
			case "SHA-1": return new require_Sha1.Sha1().hash(new Uint8Array(data)).buffer;
			default: throw new Error(`Hashing algorithm: ${JSON.stringify(algorithm)} is not supported`);
		}
	}
};

//#endregion
exports.CredoSha1Provider = CredoSha1Provider;