tor-browser

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

pk11sdr.h (1143B)


      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/. */
      4 
      5 #ifndef _PK11SDR_H_
      6 #define _PK11SDR_H_
      7 
      8 #include "pkcs11t.h"
      9 #include "seccomon.h"
     10 #include "secmodt.h"
     11 
     12 SEC_BEGIN_PROTOS
     13 
     14 /*
     15 * PK11SDR_Encrypt
     16 *  Deprecated version of PK11SDR_EncryptWithMechanism using DES3_CBC.
     17 */
     18 SECStatus
     19 PK11SDR_Encrypt(SECItem *keyid, SECItem *data, SECItem *result, void *cx);
     20 
     21 /*
     22 * PK11SDR_EncryptWithMechanism
     23 *  Encrypt a block of data using the symmetric key identified and the
     24 *  encryption mechanism specified (only AES_CBC and DES3_CBC are supported).
     25 *  The result is an ASN.1 (DER) encoded block of keyid, params and data.
     26 */
     27 SECStatus
     28 PK11SDR_EncryptWithMechanism(PK11SlotInfo *slot, SECItem *keyid, CK_MECHANISM_TYPE type, SECItem *data, SECItem *result, void *cx);
     29 
     30 /*
     31 * PK11SDR_Decrypt - decrypt data previously encrypted with PK11SDR_Encrypt
     32 * result should be freed with SECItem_ZfreeItem
     33 */
     34 SECStatus
     35 PK11SDR_Decrypt(SECItem *data, SECItem *result, void *cx);
     36 
     37 SEC_END_PROTOS
     38 
     39 #endif