mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-01 22:54:26 +02:00
stream/manage: replace base64 with base64url
This commit is contained in:
parent
73b63e5487
commit
f4acd2f141
@ -19,8 +19,8 @@ const hmacSalt = randomBytes(64).toString('hex');
|
||||
|
||||
export function createStream(obj) {
|
||||
const streamID = nanoid(),
|
||||
iv = randomBytes(16).toString('base64'),
|
||||
secret = randomBytes(256).toString('base64'),
|
||||
iv = randomBytes(16).toString('base64url'),
|
||||
secret = randomBytes(256).toString('base64url'),
|
||||
exp = new Date().getTime() + streamLifespan,
|
||||
hmac = generateHmac(`${streamID},${exp},${iv},${secret}`, hmacSalt),
|
||||
streamData = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user