netwerk/srtp/src/crypto/include/null_cipher.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /*
     2  * null-cipher.h
     3  *
     4  * header file for the null cipher
     5  *
     6  *
     7  * David A. McGrew
     8  * Cisco Systems, Inc.
     9  */
    11 /*
    12  *	
    13  * Copyright (c) 2001-2006, Cisco Systems, Inc.
    14  * All rights reserved.
    15  * 
    16  * Redistribution and use in source and binary forms, with or without
    17  * modification, are permitted provided that the following conditions
    18  * are met:
    19  * 
    20  *   Redistributions of source code must retain the above copyright
    21  *   notice, this list of conditions and the following disclaimer.
    22  * 
    23  *   Redistributions in binary form must reproduce the above
    24  *   copyright notice, this list of conditions and the following
    25  *   disclaimer in the documentation and/or other materials provided
    26  *   with the distribution.
    27  * 
    28  *   Neither the name of the Cisco Systems, Inc. nor the names of its
    29  *   contributors may be used to endorse or promote products derived
    30  *   from this software without specific prior written permission.
    31  * 
    32  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    33  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    34  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
    35  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    36  * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
    37  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    38  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    39  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    40  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
    41  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    42  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
    43  * OF THE POSSIBILITY OF SUCH DAMAGE.
    44  *
    45  */
    48 #ifndef NULL_CIPHER_H
    49 #define NULL_CIPHER_H
    51 #include "datatypes.h"
    52 #include "cipher.h"
    54 typedef struct {
    55   char foo ;/* empty, for now */
    56 } null_cipher_ctx_t;
    59 /*
    60  * none of these functions do anything (though future versions may keep
    61  * track of bytes encrypted, number of instances, and/or other info).
    62  */
    64 err_status_t
    65 null_cipher_init(null_cipher_ctx_t *c, const uint8_t *key, int key_len);
    67 err_status_t
    68 null_cipher_set_segment(null_cipher_ctx_t *c,
    69 			unsigned long segment_index);
    71 err_status_t
    72 null_cipher_encrypt(null_cipher_ctx_t *c,
    73 		    unsigned char *buf, unsigned int *bytes_to_encr);
    76 err_status_t
    77 null_cipher_encrypt_aligned(null_cipher_ctx_t *c,
    78 			    unsigned char *buf, int bytes_to_encr);
    80 #endif /* NULL_CIPHER_H */

mercurial