andre@0: /* andre@0: * chacha20.h - header file for ChaCha20 implementation. andre@0: * andre@0: * This Source Code Form is subject to the terms of the Mozilla Public andre@0: * License, v. 2.0. If a copy of the MPL was not distributed with this andre@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ andre@0: andre@0: #ifndef FREEBL_CHACHA20_H_ andre@0: #define FREEBL_CHACHA20_H_ andre@0: andre@0: #include andre@0: andre@0: /* ChaCha20XOR encrypts |inLen| bytes from |in| with the given key and andre@0: * nonce and writes the result to |out|, which may be equal to |in|. The andre@0: * initial block counter is specified by |counter|. */ andre@0: extern void ChaCha20XOR(unsigned char *out, andre@0: const unsigned char *in, unsigned int inLen, andre@0: const unsigned char key[32], andre@0: const unsigned char nonce[8], andre@0: uint64_t counter); andre@0: andre@0: #endif /* FREEBL_CHACHA20_H_ */