mirror of
https://github.com/denoland/deno.git
synced 2024-12-29 02:29:06 -05:00
format
This commit is contained in:
parent
e87cd44033
commit
f911eca8d1
2 changed files with 4 additions and 8 deletions
|
@ -246,10 +246,7 @@ export async function writeFrame(frame: WebSocketFrame, writer: Writer) {
|
|||
let header: Uint8Array;
|
||||
const hasMask = frame.mask ? 0x80 : 0;
|
||||
if (payloadLength < 126) {
|
||||
header = new Uint8Array([
|
||||
0x80 | frame.opcode,
|
||||
hasMask | payloadLength
|
||||
]);
|
||||
header = new Uint8Array([0x80 | frame.opcode, hasMask | payloadLength]);
|
||||
} else if (payloadLength < 0xffff) {
|
||||
header = new Uint8Array([
|
||||
0x80 | frame.opcode,
|
||||
|
|
|
@ -64,7 +64,7 @@ export class Sha1 {
|
|||
let code,
|
||||
index = 0,
|
||||
i,
|
||||
start = this._start,
|
||||
start = this._start,
|
||||
length = message.length || 0,
|
||||
blocks = this._blocks;
|
||||
|
||||
|
@ -369,8 +369,7 @@ export class Sha1 {
|
|||
|
||||
arrayBuffer() {
|
||||
this.finalize();
|
||||
return Uint32Array.of(
|
||||
this._h0, this._h1, this._h2, this._h3, this._h4
|
||||
).buffer;
|
||||
return Uint32Array.of(this._h0, this._h1, this._h2, this._h3, this._h4)
|
||||
.buffer;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue