mirror of
https://github.com/laochan-eacnet/backend.git
synced 2026-10-04 04:27:56 +03:00
working save data
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { createHash } from 'crypto';
|
||||
|
||||
export function fromToken(token: string) {
|
||||
const key = createHash('md5')
|
||||
.update(token, 'utf-8')
|
||||
.digest('hex');
|
||||
|
||||
return ('LCHAN' + key).slice(0, 13);
|
||||
}
|
||||
Reference in New Issue
Block a user