mirror of
https://github.com/laochan-eacnet/backend.git
synced 2026-10-09 06:49:49 +03:00
initial commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { createHash } from "crypto";
|
||||
import rc4 from 'arc4';
|
||||
|
||||
const EAMUSE_RC4_KEY = '69D74627D985EE2187161570D08D93B12455035B6DF0D8205DF5';
|
||||
|
||||
export function rc4Transfrom(keyHex: string, data: Buffer) {
|
||||
const key = createHash('md5')
|
||||
.update(keyHex + EAMUSE_RC4_KEY, 'hex')
|
||||
.digest();
|
||||
|
||||
return rc4('arc4', key)
|
||||
.encodeBuffer(data)
|
||||
}
|
||||
Reference in New Issue
Block a user