reduce browser bundle size
reduces browser bundle size by ~612k or ~92%.
This commit is contained in:
7
src/util/node-support.ts
Normal file
7
src/util/node-support.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { createHmac } from 'crypto';
|
||||
|
||||
export async function signMessage(message: string, secret: string): Promise<string> {
|
||||
return createHmac('sha256', secret)
|
||||
.update(message)
|
||||
.digest('hex');
|
||||
};
|
||||
Reference in New Issue
Block a user