-
Notifications
You must be signed in to change notification settings - Fork 99
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
🐛 aes-128-cbc not in CipherCCMTypes in createCipheriv function #386
Comments
Are you sure that algorithm is allowed in Node @shamilovtim made the types a bit stronger than See if you can find somewhere online where |
In the implementation file (src/Cipher.ts), the createCipheriv function accepts algorithm strings: However, in the type definition file (node_modules/react-native-quick-crypto/lib/typescript/Cipher.d.ts), the algorithm parameter is restricted to CipherCCM, CipherOCB, CipherGCM.
![]() |
That's just one of the overloads. Above it you'll see the other overloads that narrow the algorithm based on the combination of params passed. |
@Miigaarino @blluv if this is a bug in this case the bug is in |
I think I've handled this a bit better in #419 |
My ask above was for someone to validate if Node supports this. Actually I did handle it in #419 but might not have gotten |
What's happening?
After upgrading from 0.6.1 to 0.7.1 function

createCipheriv
shows type error sayingArgument of type '"aes-128-cbc"' is not assignable to parameter of type 'CipherGCMTypes'
Reproducible Code
Relevant log output
Device
Iphone 11
QuickCrypto Version
0.7.1
Can you reproduce this issue in the QuickCrypto Example app?
Yes, I can reproduce the same issue in the Example app here
Additional information
The text was updated successfully, but these errors were encountered: