import crypto from "node:crypto";
//#region extensions/weixin/src/util/random.ts
/**
* Generate a prefixed unique ID using timestamp + crypto random bytes.
* Format: `{prefix}:{timestamp}-{8-char hex}`
*/
function generateId(prefix) {
	return `${prefix}:${Date.now()}-${crypto.randomBytes(4).toString("hex")}`;
}
/**
* Generate a temporary file name with random suffix.
* Format: `{prefix}-{timestamp}-{8-char hex}{ext}`
*/
function tempFileName(prefix, ext) {
	return `${prefix}-${Date.now()}-${crypto.randomBytes(4).toString("hex")}${ext}`;
}
//#endregion
export { generateId, tempFileName };

//# sourceMappingURL=random.js.map