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

FIX: Failed to execute 'encrypt' on 'SubtleCrypto': AesCtrParams: counter: Missing required property #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stanbar
Copy link

@stanbar stanbar commented Jun 30, 2020

Fixes error in Browser code that caused exception Failed to execute 'encrypt' on 'SubtleCrypto': AesCtrParams: counter: Missing required property.

The issue was here:

    const output = await window.crypto.subtle[op]({name, iv /* AES-CRT require conter and length properties, not iv */}, k, input);

source: https://github.com/diafygi/webcrypto-examples#aes-ctr---encrypt

Additionally add .prettierrc.js for easier contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant