michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef _NS_STREAMCIPHER_H_ michael@0: #define _NS_STREAMCIPHER_H_ michael@0: michael@0: #include "nsIStreamCipher.h" michael@0: #include "nsString.h" michael@0: #include "pk11func.h" michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: /* dbfcbe4a-10f7-4d6f-a481-68e6d6b71d21 */ michael@0: #define NS_STREAMCIPHER_CID \ michael@0: { 0xdbfcbe4a, 0x10f7, 0x4d6f, {0xa4, 0x81, 0x68, 0xe6, 0xd6, 0xb7, 0x1d, 0x21}} michael@0: #define NS_STREAMCIPHER_CONTRACTID "@mozilla.org/security/streamcipher;1" michael@0: michael@0: class nsStreamCipher MOZ_FINAL : public nsIStreamCipher michael@0: { michael@0: public: michael@0: nsStreamCipher(); michael@0: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSISTREAMCIPHER michael@0: michael@0: private: michael@0: ~nsStreamCipher(); michael@0: michael@0: // Helper method for initializing this object. michael@0: // aIV may be null. michael@0: nsresult InitWithIV_(nsIKeyObject *aKey, SECItem* aIV); michael@0: michael@0: // Disallow copy constructor michael@0: nsStreamCipher(nsStreamCipher&); michael@0: michael@0: // Holds our stream cipher context. michael@0: PK11Context* mContext; michael@0: michael@0: // Holds the amount we've computed so far. michael@0: nsCString mValue; michael@0: }; michael@0: michael@0: #endif // _NS_STREAMCIPHER_H_