I have the following code to encrypt/decrypt data in node.js, which is working:
var cipher = crypto.createCipher('aes256', 'passphrase');
var encrypted = cipher.update("test", 'utf8', 'base64') + cipher.final('base64');
var decipher = crypto.createDecipher('aes256', 'passphrase');
var plain = decipher.update(encrypted, 'base64', 'utf8') + decipher.final('utf8');
I would like to be able to do the same in C#/.NET so that I can share data between two seperate systems. However the code that I have seen in .NET requires a Key and IV to entrypt/decrypt. How are these derived from the passphrase in the node.js Crypto library?