Add required space to [[ -n "$1" ]] (previously [[ -n"$1" ]])
[bitcoinplatinum.git] / src / crypto / chacha20.h
bloba305977bcd5f4027cbb83b27a16622bab6f0c4c3
1 // Copyright (c) 2017 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_CRYPTO_CHACHA20_H
6 #define BITCOIN_CRYPTO_CHACHA20_H
8 #include <stdint.h>
9 #include <stdlib.h>
11 /** A PRNG class for ChaCha20. */
12 class ChaCha20
14 private:
15 uint32_t input[16];
17 public:
18 ChaCha20();
19 ChaCha20(const unsigned char* key, size_t keylen);
20 void SetKey(const unsigned char* key, size_t keylen);
21 void SetIV(uint64_t iv);
22 void Seek(uint64_t pos);
23 void Output(unsigned char* output, size_t bytes);
26 #endif // BITCOIN_CRYPTO_CHACHA20_H