aboutsummaryrefslogtreecommitdiffstats
path: root/src/stream/ofb
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-13 00:38:07 +0000
committerlloyd <[email protected]>2010-10-13 00:38:07 +0000
commitc59d960db6d69bd9c479ec674768b7ec371830b5 (patch)
tree250385bd1c9c5b4a2afac27cc47d10031965f84b /src/stream/ofb
parent2e42b5aaaf8d817f612518afa91a5bc9d1465eb7 (diff)
s/u32bit/size_t/ in stream
Diffstat (limited to 'src/stream/ofb')
-rw-r--r--src/stream/ofb/ofb.cpp4
-rw-r--r--src/stream/ofb/ofb.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/stream/ofb/ofb.cpp b/src/stream/ofb/ofb.cpp
index 6fc8e4b68..1b1a066ee 100644
--- a/src/stream/ofb/ofb.cpp
+++ b/src/stream/ofb/ofb.cpp
@@ -64,7 +64,7 @@ std::string OFB::name() const
/*
* CTR-BE Encryption/Decryption
*/
-void OFB::cipher(const byte in[], byte out[], u32bit length)
+void OFB::cipher(const byte in[], byte out[], size_t length)
{
while(length >= buffer.size() - position)
{
@@ -82,7 +82,7 @@ void OFB::cipher(const byte in[], byte out[], u32bit length)
/*
* Set CTR-BE IV
*/
-void OFB::set_iv(const byte iv[], u32bit iv_len)
+void OFB::set_iv(const byte iv[], size_t iv_len)
{
if(!valid_iv_length(iv_len))
throw Invalid_IV_Length(name(), iv_len);
diff --git a/src/stream/ofb/ofb.h b/src/stream/ofb/ofb.h
index 2871dd8ee..832b93287 100644
--- a/src/stream/ofb/ofb.h
+++ b/src/stream/ofb/ofb.h
@@ -19,11 +19,11 @@ namespace Botan {
class BOTAN_DLL OFB : public StreamCipher
{
public:
- void cipher(const byte in[], byte out[], u32bit length);
+ void cipher(const byte in[], byte out[], size_t length);
- void set_iv(const byte iv[], u32bit iv_len);
+ void set_iv(const byte iv[], size_t iv_len);
- bool valid_iv_length(u32bit iv_len) const
+ bool valid_iv_length(size_t iv_len) const
{ return (iv_len <= permutation->BLOCK_SIZE); }
std::string name() const;
@@ -43,7 +43,7 @@ class BOTAN_DLL OFB : public StreamCipher
BlockCipher* permutation;
SecureVector<byte> buffer;
- u32bit position;
+ size_t position;
};
}