1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/manager/ssl/src/nsStreamCipher.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,43 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef _NS_STREAMCIPHER_H_ 1.9 +#define _NS_STREAMCIPHER_H_ 1.10 + 1.11 +#include "nsIStreamCipher.h" 1.12 +#include "nsString.h" 1.13 +#include "pk11func.h" 1.14 +#include "mozilla/Attributes.h" 1.15 + 1.16 +/* dbfcbe4a-10f7-4d6f-a481-68e6d6b71d21 */ 1.17 +#define NS_STREAMCIPHER_CID \ 1.18 +{ 0xdbfcbe4a, 0x10f7, 0x4d6f, {0xa4, 0x81, 0x68, 0xe6, 0xd6, 0xb7, 0x1d, 0x21}} 1.19 +#define NS_STREAMCIPHER_CONTRACTID "@mozilla.org/security/streamcipher;1" 1.20 + 1.21 +class nsStreamCipher MOZ_FINAL : public nsIStreamCipher 1.22 +{ 1.23 +public: 1.24 + nsStreamCipher(); 1.25 + 1.26 + NS_DECL_ISUPPORTS 1.27 + NS_DECL_NSISTREAMCIPHER 1.28 + 1.29 +private: 1.30 + ~nsStreamCipher(); 1.31 + 1.32 + // Helper method for initializing this object. 1.33 + // aIV may be null. 1.34 + nsresult InitWithIV_(nsIKeyObject *aKey, SECItem* aIV); 1.35 + 1.36 + // Disallow copy constructor 1.37 + nsStreamCipher(nsStreamCipher&); 1.38 + 1.39 + // Holds our stream cipher context. 1.40 + PK11Context* mContext; 1.41 + 1.42 + // Holds the amount we've computed so far. 1.43 + nsCString mValue; 1.44 +}; 1.45 + 1.46 +#endif // _NS_STREAMCIPHER_H_