security/manager/ssl/src/nsStreamCipher.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial