Bump @justinribeiro/lite-youtube from 0.9.0 to 0.9.1 in /build/javascript (#273)
* Commit updated Javascript packages * Bump preact from 10.5.4 to 10.5.5 in /build/javascript (#265) * Trying a new github workflow to install javascript packages * Bump tailwindcss from 1.9.2 to 1.9.4 in /build/javascript (#266) Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 1.9.2 to 1.9.4. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v1.9.2...v1.9.4) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Commit updated Javascript packages * Bump preact from 10.5.4 to 10.5.5 in /build/javascript Bumps [preact](https://github.com/preactjs/preact) from 10.5.4 to 10.5.5. - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](https://github.com/preactjs/preact/compare/10.5.4...10.5.5) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Gabe Kangas <gabek@real-ity.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Owncast <owncast@owncast.online> * Bump @justinribeiro/lite-youtube in /build/javascript Bumps [@justinribeiro/lite-youtube](https://github.com/justinribeiro/lite-youtube) from 0.9.0 to 0.9.1. - [Release notes](https://github.com/justinribeiro/lite-youtube/releases) - [Commits](https://github.com/justinribeiro/lite-youtube/commits) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Owncast <owncast@owncast.online> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gabe Kangas <gabek@real-ity.com>
This commit is contained in:
85
build/javascript/node_modules/pkcs7/src/pad.js
generated
vendored
Normal file
85
build/javascript/node_modules/pkcs7/src/pad.js
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* pkcs7.pad
|
||||
* https://github.com/brightcove/pkcs7
|
||||
*
|
||||
* Copyright (c) 2014 Brightcove
|
||||
* Licensed under the apache2 license.
|
||||
*/
|
||||
|
||||
let PADDING;
|
||||
|
||||
/**
|
||||
* Returns a new Uint8Array that is padded with PKCS#7 padding.
|
||||
*
|
||||
* @param plaintext {Uint8Array} the input bytes before encryption
|
||||
* @return {Uint8Array} the padded bytes
|
||||
* @see http://tools.ietf.org/html/rfc5652
|
||||
*/
|
||||
export default function pad(plaintext) {
|
||||
const padding = PADDING[(plaintext.byteLength % 16) || 0];
|
||||
const result = new Uint8Array(plaintext.byteLength + padding.length);
|
||||
|
||||
result.set(plaintext);
|
||||
result.set(padding, plaintext.byteLength);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// pre-define the padding values
|
||||
PADDING = [
|
||||
[16, 16, 16, 16,
|
||||
16, 16, 16, 16,
|
||||
16, 16, 16, 16,
|
||||
16, 16, 16, 16],
|
||||
|
||||
[15, 15, 15, 15,
|
||||
15, 15, 15, 15,
|
||||
15, 15, 15, 15,
|
||||
15, 15, 15],
|
||||
|
||||
[14, 14, 14, 14,
|
||||
14, 14, 14, 14,
|
||||
14, 14, 14, 14,
|
||||
14, 14],
|
||||
|
||||
[13, 13, 13, 13,
|
||||
13, 13, 13, 13,
|
||||
13, 13, 13, 13,
|
||||
13],
|
||||
|
||||
[12, 12, 12, 12,
|
||||
12, 12, 12, 12,
|
||||
12, 12, 12, 12],
|
||||
|
||||
[11, 11, 11, 11,
|
||||
11, 11, 11, 11,
|
||||
11, 11, 11],
|
||||
|
||||
[10, 10, 10, 10,
|
||||
10, 10, 10, 10,
|
||||
10, 10],
|
||||
|
||||
[9, 9, 9, 9,
|
||||
9, 9, 9, 9,
|
||||
9],
|
||||
|
||||
[8, 8, 8, 8,
|
||||
8, 8, 8, 8],
|
||||
|
||||
[7, 7, 7, 7,
|
||||
7, 7, 7],
|
||||
|
||||
[6, 6, 6, 6,
|
||||
6, 6],
|
||||
|
||||
[5, 5, 5, 5,
|
||||
5],
|
||||
|
||||
[4, 4, 4, 4],
|
||||
|
||||
[3, 3, 3],
|
||||
|
||||
[2, 2],
|
||||
|
||||
[1]
|
||||
];
|
||||
5
build/javascript/node_modules/pkcs7/src/pkcs7.js
generated
vendored
Normal file
5
build/javascript/node_modules/pkcs7/src/pkcs7.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import pad from './pad.js';
|
||||
import unpad from './unpad.js';
|
||||
import {version as VERSION} from '../package.json';
|
||||
|
||||
export { pad, unpad, VERSION };
|
||||
10
build/javascript/node_modules/pkcs7/src/unpad.js
generated
vendored
Normal file
10
build/javascript/node_modules/pkcs7/src/unpad.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Returns the subarray of a Uint8Array without PKCS#7 padding.
|
||||
*
|
||||
* @param padded {Uint8Array} unencrypted bytes that have been padded
|
||||
* @return {Uint8Array} the unpadded bytes
|
||||
* @see http://tools.ietf.org/html/rfc5652
|
||||
*/
|
||||
export default function unpad(padded) {
|
||||
return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);
|
||||
}
|
||||
Reference in New Issue
Block a user