block/include/nil/crypto3/block/algorithm/encrypt.hpp
Go to the documentation of this file.
43 using encryption_policy = typename block::modes::isomorphic<BlockCipher, nop_padding>::encryption_policy;
64 template<typename BlockCipher, typename InputIterator, typename KeyInputIterator, typename OutputIterator,
98 template<typename BlockCipher, typename InputIterator, typename KeySinglePassRange, typename OutputIterator,
133 OutputIterator encrypt(InputIterator first, InputIterator last, const block::cipher_key<BlockCipher> &key,
143 return EncrypterImpl(first, last, std::move(out), CipherAccumulator(EncryptionMode(BlockCipher(key.key))));
165 typename std::enable_if<boost::accumulators::detail::is_accumulator_set<OutputAccumulator>::value,
195 typename std::enable_if<boost::accumulators::detail::is_accumulator_set<OutputAccumulator>::value,
227 encrypt(InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last) {
268 first, last, CipherAccumulator(EncryptionMode(BlockCipher(block::cipher_key<BlockCipher>(key).key))));
299 first, last, CipherAccumulator(EncryptionMode(BlockCipher(block::cipher_key<BlockCipher>(key).key))));
347 template<typename BlockCipher, typename SinglePassRange, typename KeySinglePassRange, typename OutputIterator,
349 OutputIterator encrypt(const SinglePassRange &rng, const KeySinglePassRange &key, OutputIterator out) {
389 return EncrypterImpl(rng, std::move(out), CipherAccumulator(EncryptionMode(BlockCipher(key.key))));
406 template<typename BlockCipher, typename SinglePassRange, typename KeySinglePassRange, typename OutputRange,
408 OutputRange &encrypt(const SinglePassRange &rng, const KeySinglePassRange &key, OutputRange &out) {
437 OutputRange &encrypt(const SinglePassRange &rng, const block::cipher_key<BlockCipher> &key, OutputRange &out) {
446 return EncrypterImpl(rng, std::move(out), CipherAccumulator(EncryptionMode(BlockCipher(key.key))));
526 OutputIterator encrypt(std::initializer_list<T> r, std::initializer_list<K> key, OutputIterator out) {
565 return EncrypterImpl(r, std::move(out), CipherAccumulator(EncryptionMode(BlockCipher(key.key))));
583 OutputRange &encrypt(std::initializer_list<T> r, std::initializer_list<K> key, OutputRange &out) {
611 OutputRange &encrypt(std::initializer_list<T> r, const block::cipher_key<BlockCipher> &key, OutputRange &out) {
620 return EncrypterImpl(r, std::move(out), CipherAccumulator(EncryptionMode(BlockCipher(key.key))));
OutputIterator encrypt(InputIterator first, InputIterator last, KeyInputIterator key_first, KeyInputIterator key_last, OutputIterator out)
Definition: block/include/nil/crypto3/block/algorithm/encrypt.hpp:66
boost::accumulators::accumulator_set< digest< ProcessingMode::block_bits >, boost::accumulators::features< accumulators::tag::block< ProcessingMode > >, std::size_t > accumulator_set
Accumulator set with pre-defined block cipher accumulator params.
Definition: block/include/nil/crypto3/block/cipher_state.hpp:51
boost::mpl::apply< AccumulatorSet, tag::block< Mode > >::type::result_type block(const AccumulatorSet &acc)
Definition: accumulators/block.hpp:259
OutputIterator move(const SinglePassRange &rng, OutputIterator result)
Definition: move.hpp:45
typename block::modes::isomorphic< BlockCipher, nop_padding >::encryption_policy encryption_policy
Definition: block/include/nil/crypto3/block/algorithm/encrypt.hpp:43
boost::accumulators::accumulator_set< mac::digest< MessageAuthenticationCode::input_block_bits >, boost::accumulators::features< accumulators::tag::mac< MessageAuthenticationCode > >> BlockCipher
Definition: cbc_mac_state.hpp:40
Definition: pair.hpp:31
Definition: cipher_key.hpp:37
Definition: cipher_modes.hpp:51
Definition: block/include/nil/crypto3/block/cipher_value.hpp:165
Definition: block/include/nil/crypto3/block/cipher_value.hpp:77
Definition: block/include/nil/crypto3/block/cipher_value.hpp:47
Definition: block/include/nil/crypto3/block/cipher_value.hpp:62
Definition: cipher_modes.hpp:130
detail::isomorphic_encryption_policy< cipher_type, padding_type > encryption_policy
Definition: cipher_modes.hpp:134