import crypto from "crypto";

const privatekey = `-----BEGIN RSA PRIVATE KEY-----
${process.env.PRIVATE_KEY}
-----END RSA PRIVATE KEY-----`;

export default function (input) {
	const sign = crypto.createSign("sha1");
	sign.write(input);
	sign.end();

	const signature = sign.sign(privatekey);
	return signature.toString("base64");
}
