import crypto from "https://cdn.jsdelivr.net/npm/crypto-js@4.2.0/+esm"
export const take = [
{ type: "text", label: "Content" },
{
label: "Type",
type: "dropdown",
options: [
"MD5",
"SHA1",
"SHA224",
"SHA256",
"SHA3",
"SHA384",
"SHA512",
"RIPEMD160",
],
},
]
export const make = ([message, type]) => {
return {
type: "code",
value: crypto[type](message).toString(),
}
}