aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/new_engine.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-13 16:10:34 +0000
committerlloyd <[email protected]>2010-10-13 16:10:34 +0000
commita142500346e9bef5c4b0905103eac9a494d6822e (patch)
tree6bdee25d85d7071f927caa5d4ffb251f085e02a8 /doc/examples/new_engine.cpp
parent18d3acffbe2324a90c505cf23ff17c1392c3be4d (diff)
Fix examples
Diffstat (limited to 'doc/examples/new_engine.cpp')
-rw-r--r--doc/examples/new_engine.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/examples/new_engine.cpp b/doc/examples/new_engine.cpp
index 6c7bc340a..ed4abf4d2 100644
--- a/doc/examples/new_engine.cpp
+++ b/doc/examples/new_engine.cpp
@@ -23,16 +23,16 @@ class XOR_Cipher : public StreamCipher
XOR_Cipher() : StreamCipher(1, 32) { mask_pos = 0; }
private:
- void cipher(const byte in[], byte out[], u32bit length)
+ void cipher(const byte in[], byte out[], size_t length)
{
- for(u32bit j = 0; j != length; j++)
+ for(size_t j = 0; j != length; j++)
{
out[j] = in[j] ^ mask[mask_pos];
mask_pos = (mask_pos + 1) % mask.size();
}
}
- void key_schedule(const byte key[], u32bit length)
+ void key_schedule(const byte key[], size_t length)
{
mask.set(key, length);
}