tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

selfencrypt.h (1263B)


      1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
      2 /*
      3 * This file is PRIVATE to SSL.
      4 *
      5 * This Source Code Form is subject to the terms of the Mozilla Public
      6 * License, v. 2.0. If a copy of the MPL was not distributed with this
      7 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      8 
      9 #ifndef __selfencrypt_h_
     10 #define __selfencrypt_h_
     11 
     12 #include "secmodt.h"
     13 
     14 unsigned int ssl_SelfEncryptGetProtectedSize(unsigned int inLen);
     15 SECStatus ssl_SelfEncryptProtect(
     16    sslSocket *ss, const PRUint8 *in, unsigned int inLen,
     17    PRUint8 *out, unsigned int *outLen, unsigned int maxOutLen);
     18 SECStatus ssl_SelfEncryptUnprotect(
     19    sslSocket *ss, const PRUint8 *in, unsigned int inLen,
     20    PRUint8 *out, unsigned int *outLen, unsigned int maxOutLen);
     21 
     22 /* Exported for use in unit tests.*/
     23 SECStatus ssl_SelfEncryptProtectInt(
     24    PK11SymKey *encKey, PK11SymKey *macKey, const unsigned char *keyName,
     25    const PRUint8 *in, unsigned int inLen,
     26    PRUint8 *out, unsigned int *outLen, unsigned int maxOutLen);
     27 SECStatus ssl_SelfEncryptUnprotectInt(
     28    PK11SymKey *encKey, PK11SymKey *macKey, const unsigned char *keyName,
     29    const PRUint8 *in, unsigned int inLen,
     30    PRUint8 *out, unsigned int *outLen, unsigned int maxOutLen);
     31 
     32 #endif