#include "nsISupports.idl" #include "IPasspetAES.idl" // UUID version 5 for http://passpet.org/XPCOM/IPasspetGCM [scriptable, uuid(48602656-5d61-518b-b136-40df6d99ae65)] interface IPasspetGCM : nsISupports { // Set the cipher and initialization vector. void initWithIV(in IPasspetAES cipher, in ACString iv); // Set the cipher and generate the IV from a nonce. void initWithNonce(in IPasspetAES cipher, in ACString nonce); // Encrypt or decrypt data in CTR mode (without adding or checking a MAC). ACString transform(in ACString data); // Encrypt or decrypt data in Galois/Counter Mode. // The last 16 bytes of the cipherdata are the MAC. ACString encrypt(in ACString data); ACString decrypt(in ACString data); };