Comments (5)
Your encrypted data uses PKSC7, but the example rijndael script uses null-padding.
from node-rijndael.
I am sorry your code didn't work even with
paddingmode.None
or
paddingmode.Zeros
from node-rijndael.
What is the default block size for RijndaelManaged
? Please post your sample data when using paddingmode.Zeros
and a block size of 256 bits.
from node-rijndael.
The default block size for the RijndaelManaged algorithms is 128 bits.
Here is the parameterless constructor of Rijndeal class (RijndaelManaged inherits form that class)
protected Rijndael()
{
this.KeySizeValue = 256;
this.BlockSizeValue = 128;
this.FeedbackSizeValue = this.BlockSizeValue;
this.LegalBlockSizesValue = Rijndael.s_legalBlockSizes;
this.LegalKeySizesValue = Rijndael.s_legalKeySizes;
}
for more info please follow
https://msdn.microsoft.com/en-us/library/system.security.cryptography.rijndaelmanaged(v=vs.110).aspx
//sample data
Here all the information is base64 string and assuming paddingmode Zeros with KeySize 256 bit.
Rindael IV is +rNLB50lMq/Hc25cSN9avg==
Rindeal Key is oQNF+m9WVjIEL+ZS1l5h7AZLtzpnjTpxpyA1l3xju9c=
Encrypted cipher is 0BUtWkgiGCXW6hJi9g8nww==
The expected output after decryption is "Hello, World!"(quotes for clarity).
from node-rijndael.
This library only supports rijndael with a block size of 256-bits, and you're using RijndaelManaged
with a block size of 128-bits, so your use-case is not supported.
AES is a form of rijndael that only supports a 128-bit block size. You should check out the built-in crypto library.
from node-rijndael.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-rijndael.