1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/srtp/src/crypto/include/null_cipher.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,80 @@ 1.4 +/* 1.5 + * null-cipher.h 1.6 + * 1.7 + * header file for the null cipher 1.8 + * 1.9 + * 1.10 + * David A. McGrew 1.11 + * Cisco Systems, Inc. 1.12 + */ 1.13 + 1.14 +/* 1.15 + * 1.16 + * Copyright (c) 2001-2006, Cisco Systems, Inc. 1.17 + * All rights reserved. 1.18 + * 1.19 + * Redistribution and use in source and binary forms, with or without 1.20 + * modification, are permitted provided that the following conditions 1.21 + * are met: 1.22 + * 1.23 + * Redistributions of source code must retain the above copyright 1.24 + * notice, this list of conditions and the following disclaimer. 1.25 + * 1.26 + * Redistributions in binary form must reproduce the above 1.27 + * copyright notice, this list of conditions and the following 1.28 + * disclaimer in the documentation and/or other materials provided 1.29 + * with the distribution. 1.30 + * 1.31 + * Neither the name of the Cisco Systems, Inc. nor the names of its 1.32 + * contributors may be used to endorse or promote products derived 1.33 + * from this software without specific prior written permission. 1.34 + * 1.35 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1.36 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1.37 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 1.38 + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 1.39 + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 1.40 + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 1.41 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 1.42 + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1.43 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 1.44 + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 1.45 + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 1.46 + * OF THE POSSIBILITY OF SUCH DAMAGE. 1.47 + * 1.48 + */ 1.49 + 1.50 + 1.51 +#ifndef NULL_CIPHER_H 1.52 +#define NULL_CIPHER_H 1.53 + 1.54 +#include "datatypes.h" 1.55 +#include "cipher.h" 1.56 + 1.57 +typedef struct { 1.58 + char foo ;/* empty, for now */ 1.59 +} null_cipher_ctx_t; 1.60 + 1.61 + 1.62 +/* 1.63 + * none of these functions do anything (though future versions may keep 1.64 + * track of bytes encrypted, number of instances, and/or other info). 1.65 + */ 1.66 + 1.67 +err_status_t 1.68 +null_cipher_init(null_cipher_ctx_t *c, const uint8_t *key, int key_len); 1.69 + 1.70 +err_status_t 1.71 +null_cipher_set_segment(null_cipher_ctx_t *c, 1.72 + unsigned long segment_index); 1.73 + 1.74 +err_status_t 1.75 +null_cipher_encrypt(null_cipher_ctx_t *c, 1.76 + unsigned char *buf, unsigned int *bytes_to_encr); 1.77 + 1.78 + 1.79 +err_status_t 1.80 +null_cipher_encrypt_aligned(null_cipher_ctx_t *c, 1.81 + unsigned char *buf, int bytes_to_encr); 1.82 + 1.83 +#endif /* NULL_CIPHER_H */