It looks as though you stumbled across a bug in Rebex Security - thanks for the code snippet! The problem is that the component forgets the already set password when the encryption algorithm is changed before encrypting for the second time. I am opening a case for this issue and will report here once we have a solution.
UPDATE:
a fix will be released soon as part of the next release of Rebex components, e.g. 2016 R1.1.
Before we fix this issue, please call encryption.SetPassword() method after you change to AesCbc. This way a correct password will be used for the second encrypting layer and you will be able to decrypt it with the expected password.
Here is the code that works:
string password = "DitIsEenHeleLangeKeyDatGeheimIsVoorIedereen!";
// encrypt file with TwoFish
var encryption = new FileEncryption();
encryption.EncryptionAlgorithm = FileEncryptionAlgorithm.TwofishCbc;
encryption.SetPassword(password);
encryption.Encrypt("mydata.txt", "mydata.txt.enc");
// encrypt the encrypted file with AES - second layer
encryption.EncryptionAlgorithm = FileEncryptionAlgorithm.AesCbc;
encryption.SetPassword(password); // please add this line as a workaround
encryption.Encrypt("mydata.txt.enc", "mydata.txt.enc.enc");
var decryption = new FileEncryption();
decryption.EncryptionAlgorithm = FileEncryptionAlgorithm.AesCbc;
decryption.SetPassword(password);
decryption.Decrypt("mydata.txt.enc.enc", "decrypted.txt.dec");
decryption.EncryptionAlgorithm = FileEncryptionAlgorithm.TwofishCbc;
decryption.Decrypt("decrypted.txt.dec", "decrypted.txt");