From 4b70dbf7c24dc4f60349e96220601f6c55c81c52 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Fri, 26 Jun 2015 11:28:13 +0200 Subject: lib/block: Convert &vec[0] to vec.data() --- src/lib/block/block_cipher.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/block/block_cipher.h') diff --git a/src/lib/block/block_cipher.h b/src/lib/block/block_cipher.h index 73e67b790..060dbb29b 100644 --- a/src/lib/block/block_cipher.h +++ b/src/lib/block/block_cipher.h @@ -82,7 +82,7 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm template void encrypt(std::vector& block) const { - return encrypt_n(&block[0], &block[0], block.size() / block_size()); + return encrypt_n(block.data(), block.data(), block.size() / block_size()); } /** @@ -92,7 +92,7 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm template void decrypt(std::vector& block) const { - return decrypt_n(&block[0], &block[0], block.size() / block_size()); + return decrypt_n(block.data(), block.data(), block.size() / block_size()); } /** @@ -104,7 +104,7 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm void encrypt(const std::vector& in, std::vector& out) const { - return encrypt_n(&in[0], &out[0], in.size() / block_size()); + return encrypt_n(in.data(), out.data(), in.size() / block_size()); } /** @@ -116,7 +116,7 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm void decrypt(const std::vector& in, std::vector& out) const { - return decrypt_n(&in[0], &out[0], in.size() / block_size()); + return decrypt_n(in.data(), out.data(), in.size() / block_size()); } /** -- cgit v1.2.3