-
Notifications
You must be signed in to change notification settings - Fork 1k
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
add ecc encrypt&decrypt #2597
add ecc encrypt&decrypt #2597
Conversation
…iu/neo into add-ecc-encryption-and-decryption
This reverts commit 80d26ca.
…iu/neo into add-ecc-encryption-and-decryption
Test cases crash the Its this code that cause the crash: using var cipher = new AesGcm(keyBytes); |
Co-authored-by: Jinghui Liao <[email protected]>
|
@ZhangTao1596 Thank you, will try it out |
Co-authored-by: Jinghui Liao <[email protected]>
Co-authored-by: Jinghui Liao <[email protected]>
Co-authored-by: Nicole <[email protected]>
src/neo/Cryptography/Helper.cs
Outdated
|
||
public static byte[] AES256Decrypt(this byte[] encryptedData, byte[] key, byte[] associatedData = null) | ||
{ | ||
if (key.Length != 32) throw new ArgumentException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check encryptedData
length?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The key length,which is checked here. It should be 32 bytes when we use a AES gcm mode
Merge? |
Close #2594