mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-17 22:00:00 +00:00
stream/manage: replace base64 with base64url
This commit is contained in:
parent
73b63e5487
commit
f4acd2f141
1 changed files with 2 additions and 2 deletions
|
@ -19,8 +19,8 @@ const hmacSalt = randomBytes(64).toString('hex');
|
||||||
|
|
||||||
export function createStream(obj) {
|
export function createStream(obj) {
|
||||||
const streamID = nanoid(),
|
const streamID = nanoid(),
|
||||||
iv = randomBytes(16).toString('base64'),
|
iv = randomBytes(16).toString('base64url'),
|
||||||
secret = randomBytes(256).toString('base64'),
|
secret = randomBytes(256).toString('base64url'),
|
||||||
exp = new Date().getTime() + streamLifespan,
|
exp = new Date().getTime() + streamLifespan,
|
||||||
hmac = generateHmac(`${streamID},${exp},${iv},${secret}`, hmacSalt),
|
hmac = generateHmac(`${streamID},${exp},${iv},${secret}`, hmacSalt),
|
||||||
streamData = {
|
streamData = {
|
||||||
|
|
Loading…
Reference in a new issue