Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Larger File is not able to be encrypted #41

Closed
L00tz1ffer opened this issue Jun 28, 2022 · 2 comments · Fixed by #51
Closed

Larger File is not able to be encrypted #41

L00tz1ffer opened this issue Jun 28, 2022 · 2 comments · Fixed by #51
Assignees
Labels
bug Something isn't working

Comments

@L00tz1ffer
Copy link

Got a File with 21k words. tryin to encrypt file but file does not get encrypted, is there a limit for purpose?!

@meld-cp meld-cp added the bug Something isn't working label Aug 14, 2022
@meld-cp
Copy link
Owner

meld-cp commented Nov 7, 2022

Tracking down the issue to:

EncryptedFileContentView.ts:230 RangeError: Maximum call stack size exceeded
    at CryptoHelperV2.eval (CryptoHelper.ts:59:35)
    at Generator.next (<anonymous>)
    at fulfilled (tslib.es6.js:73:58)

which is this line

//convert array to base64
const base64Text = btoa( String.fromCharCode(...finalBytes) );

will work on a fix

@meld-cp
Copy link
Owner

meld-cp commented Nov 7, 2022

I suspect the error is to do with the String.fromCharCode call.

To workaround the problem I'll need to batch the calls to String.fromCharCode and concatenate the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants