chore(checkpoint): save club core backend and pending pos fixes
This commit is contained in:
9
project/src/modules/club/infrastructure/device-token.ts
Normal file
9
project/src/modules/club/infrastructure/device-token.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { createHash, randomBytes } from 'node:crypto';
|
||||
|
||||
export function generateDeviceToken(): string {
|
||||
return randomBytes(48).toString('base64url');
|
||||
}
|
||||
|
||||
export function hashDeviceToken(token: string): string {
|
||||
return createHash('sha256').update(token).digest('hex');
|
||||
}
|
||||
Reference in New Issue
Block a user