You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
448 B

// Minimal crypto module implementation for browser using Web Crypto API
const crypto = {
...window.crypto,
// Add any Node.js crypto methods that might be needed
randomBytes: (size) => {
const buffer = new Uint8Array(size);
window.crypto.getRandomValues(buffer);
return buffer;
},
createHash: () => ({
update: () => ({
digest: () => new Uint8Array(32), // Return empty hash
}),
}),
};
export default crypto;