25 #ifndef CRYPTO3_STREAM_SEEK_HPP
26 #define CRYPTO3_STREAM_SEEK_HPP
51 template<
typename StreamCipher,
typename InputIterator,
typename KeyIterator,
typename OutputIterator>
52 OutputIterator
seek(InputIterator first, InputIterator last, KeyIterator key_first, KeyIterator key_last,
55 typedef typename StreamCipher::stream_encrypter_type EncryptionMode;
61 return EncrypterImpl(first, last,
std::move(out), CiperState(StreamCipher(key_first, key_last)));
79 template<
typename StreamCipher,
typename InputIterator,
80 typename OutputAccumulator =
81 typename stream::stream_accumulator<typename StreamCipher::stream_encrypter_type>>
82 OutputAccumulator &
seek(InputIterator first, InputIterator last, OutputAccumulator &acc) {
84 typedef typename StreamCipher::stream_encrypter_type EncryptionMode;
90 return EncrypterImpl(first, last, acc);
107 template<
typename StreamCipher,
typename SinglePassRange,
108 typename OutputAccumulator =
109 typename stream::stream_accumulator<typename StreamCipher::stream_encrypter_type>>
110 OutputAccumulator &
seek(
const SinglePassRange &r, OutputAccumulator &acc) {
112 typedef typename StreamCipher::stream_encrypter_type EncryptionMode;
118 return EncrypterImpl(r, acc);
137 template<
typename StreamCipher,
typename InputIterator,
typename KeyIterator,
138 typename CipherAccumulator =
139 typename stream::stream_accumulator<typename StreamCipher::stream_encrypter_type>>
140 stream::detail::range_cipher_impl<stream::detail::value_cipher_impl<CipherAccumulator>>
141 seek(InputIterator first, InputIterator last, KeyIterator key_first, KeyIterator key_last) {
145 return EncrypterImpl(first, last, CipherAccumulator(StreamCipher(key_first, key_last)));
164 template<
typename StreamCipher,
typename SinglePassRange,
typename KeyRange,
typename OutputIterator>
165 OutputIterator
seek(
const SinglePassRange &rng,
const KeyRange &key, OutputIterator out) {
167 typedef typename StreamCipher::stream_encrypter_type EncryptionMode;
173 return EncrypterImpl(rng,
std::move(out), CipherState(StreamCipher(key)));
191 template<
typename StreamCipher,
typename SinglePassRange,
typename KeyRange,
192 typename CipherAccumulator =
193 typename stream::stream_accumulator<typename StreamCipher::stream_encrypter_type>>
194 stream::detail::range_cipher_impl<stream::detail::value_cipher_impl<CipherAccumulator>>
195 seek(
const SinglePassRange &r,
const KeyRange &key) {
200 return EncrypterImpl(r, CipherState(StreamCipher(key)));
OutputIterator seek(InputIterator first, InputIterator last, KeyIterator key_first, KeyIterator key_last, OutputIterator out)
Definition: seek.hpp:52
OutputIterator move(const SinglePassRange &rng, OutputIterator result)
Definition: move.hpp:45
boost::accumulators::accumulator_set< digest< ProcessingMode::input_stream_bits >, boost::accumulators::features< accumulators::tag::stream< ProcessingMode > >> stream_accumulator
Cipher state managing container.
Definition: stream/include/nil/crypto3/stream/cipher_state.hpp:49
Definition: stream/include/nil/crypto3/stream/cipher_value.hpp:161
Definition: stream/include/nil/crypto3/stream/cipher_value.hpp:73
Definition: stream/include/nil/crypto3/stream/cipher_value.hpp:43
Definition: stream/include/nil/crypto3/stream/cipher_value.hpp:58