Можно ли использовать глобальный шифр и использовать его повторно?
Это дает какой-то выигрыш в производительности?
// this is global
cipher = forge.aes.createEncryptionCipher(key);
// this is somewhere else
cipher.start(iv);
cipher.update(forge.util.createBuffer(someBytes));
cipher.finish();
var encrypted = cipher.output;
// this is somewhere else
cipher.start(OTHERiv);
cipher.update(forge.util.createBuffer(someOTHERBytes));
cipher.finish();
var encrypted2 = cipher.output;