Remove empty lines

This commit is contained in:
Belma Gutlic 2019-12-24 20:38:34 +01:00
parent 4b2091be9f
commit 36a66c59da

View File

@ -7,14 +7,12 @@ interface ReturnEncryptionWrapper {
const maxPlaintextLength = 65519; const maxPlaintextLength = 65519;
// Returns generator that encrypts payload from the user // Returns generator that encrypts payload from the user
export function encryptStream(handshake: Handshake): ReturnEncryptionWrapper { export function encryptStream(handshake: Handshake): ReturnEncryptionWrapper {
return async function * (source) { return async function * (source) {
for await (const chunk of source) { for await (const chunk of source) {
const chunkBuffer = Buffer.from(chunk); const chunkBuffer = Buffer.from(chunk);
for (let i = 0; i < chunkBuffer.length; i += maxPlaintextLength) { for (let i = 0; i < chunkBuffer.length; i += maxPlaintextLength) {
let end = i + maxPlaintextLength; let end = i + maxPlaintextLength;
if (end > chunkBuffer.length) { if (end > chunkBuffer.length) {
@ -29,7 +27,6 @@ export function encryptStream(handshake: Handshake): ReturnEncryptionWrapper {
} }
// Decrypt received payload to the user // Decrypt received payload to the user
export function decryptStream(handshake: Handshake): ReturnEncryptionWrapper { export function decryptStream(handshake: Handshake): ReturnEncryptionWrapper {
return async function * (source) { return async function * (source) {