Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: MiniTLS-HTTPS-Example
crypto_arc4.h
00001 /* 00002 MiniTLS - A super trimmed down TLS/SSL Library for embedded devices 00003 Author: Donatien Garnier 00004 Copyright (C) 2013-2014 AppNearMe Ltd 00005 00006 This program is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU General Public License 00008 as published by the Free Software Foundation; either version 2 00009 of the License, or (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 *//** 00020 * \file crypto_arc4.h 00021 * \copyright Copyright (c) AppNearMe Ltd 2014 00022 * \author Donatien Garnier 00023 */ 00024 00025 #ifndef CRYPTO_ARC4_H_ 00026 #define CRYPTO_ARC4_H_ 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 typedef struct __crypto_arc4 00033 { 00034 int i; 00035 int j; 00036 uint8_t state[256]; 00037 } crypto_arc4_t; 00038 00039 void crypto_arc4_init(crypto_arc4_t* arc4, const uint8_t* key, size_t key_size); 00040 00041 void crypto_arc4_encrypt(crypto_arc4_t* arc4, const uint8_t* plaintext, uint8_t* ciphertext, size_t length); 00042 #define crypto_arc4_decrypt(arc4, ciphertext, plaintext, length) crypto_arc4_encrypt(arc4, ciphertext, plaintext, length) 00043 00044 void crypto_arc4_process(crypto_arc4_t* arc4, buffer_t* buffer); 00045 00046 00047 00048 #ifdef __cplusplus 00049 } 00050 #endif 00051 00052 #endif /* CRYPTO_ARC4_H_ */
Generated on Wed Jul 13 2022 00:22:54 by
1.7.2