aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-13 01:34:15 +0000
committerlloyd <[email protected]>2010-10-13 01:34:15 +0000
commitfe4119c74b5e81a354a5313e4d2efbf9a135aa81 (patch)
tree5c5254cc3a4e5713169ef1d52a83db19c8c4ed65 /src/mac
parent60fb91d8cb1710d07041f76050d24229ce91131b (diff)
Use size_t rather than u32bit in SymmetricAlgorithm
Diffstat (limited to 'src/mac')
-rw-r--r--src/mac/cbc_mac/cbc_mac.cpp2
-rw-r--r--src/mac/cbc_mac/cbc_mac.h2
-rw-r--r--src/mac/cmac/cmac.cpp2
-rw-r--r--src/mac/cmac/cmac.h2
-rw-r--r--src/mac/hmac/hmac.cpp2
-rw-r--r--src/mac/hmac/hmac.h3
-rw-r--r--src/mac/ssl3mac/ssl3_mac.cpp2
-rw-r--r--src/mac/ssl3mac/ssl3_mac.h2
-rw-r--r--src/mac/x919_mac/x919_mac.cpp2
-rw-r--r--src/mac/x919_mac/x919_mac.h2
10 files changed, 11 insertions, 10 deletions
diff --git a/src/mac/cbc_mac/cbc_mac.cpp b/src/mac/cbc_mac/cbc_mac.cpp
index 1b03f0ab9..2a5a6c10f 100644
--- a/src/mac/cbc_mac/cbc_mac.cpp
+++ b/src/mac/cbc_mac/cbc_mac.cpp
@@ -54,7 +54,7 @@ void CBC_MAC::final_result(byte mac[])
/*
* CBC-MAC Key Schedule
*/
-void CBC_MAC::key_schedule(const byte key[], u32bit length)
+void CBC_MAC::key_schedule(const byte key[], size_t length)
{
e->set_key(key, length);
}
diff --git a/src/mac/cbc_mac/cbc_mac.h b/src/mac/cbc_mac/cbc_mac.h
index 69fef9c57..6b30ef764 100644
--- a/src/mac/cbc_mac/cbc_mac.h
+++ b/src/mac/cbc_mac/cbc_mac.h
@@ -31,7 +31,7 @@ class BOTAN_DLL CBC_MAC : public MessageAuthenticationCode
private:
void add_data(const byte[], size_t);
void final_result(byte[]);
- void key_schedule(const byte[], u32bit);
+ void key_schedule(const byte[], size_t);
BlockCipher* e;
SecureVector<byte> state;
diff --git a/src/mac/cmac/cmac.cpp b/src/mac/cmac/cmac.cpp
index 05fa7d037..05f487ad1 100644
--- a/src/mac/cmac/cmac.cpp
+++ b/src/mac/cmac/cmac.cpp
@@ -89,7 +89,7 @@ void CMAC::final_result(byte mac[])
/*
* CMAC Key Schedule
*/
-void CMAC::key_schedule(const byte key[], u32bit length)
+void CMAC::key_schedule(const byte key[], size_t length)
{
clear();
e->set_key(key, length);
diff --git a/src/mac/cmac/cmac.h b/src/mac/cmac/cmac.h
index 5655e1eea..ac929eaf3 100644
--- a/src/mac/cmac/cmac.h
+++ b/src/mac/cmac/cmac.h
@@ -39,7 +39,7 @@ class BOTAN_DLL CMAC : public MessageAuthenticationCode
private:
void add_data(const byte[], size_t);
void final_result(byte[]);
- void key_schedule(const byte[], u32bit);
+ void key_schedule(const byte[], size_t);
BlockCipher* e;
SecureVector<byte> buffer, state, B, P;
diff --git a/src/mac/hmac/hmac.cpp b/src/mac/hmac/hmac.cpp
index c842a944d..dfd800426 100644
--- a/src/mac/hmac/hmac.cpp
+++ b/src/mac/hmac/hmac.cpp
@@ -34,7 +34,7 @@ void HMAC::final_result(byte mac[])
/*
* HMAC Key Schedule
*/
-void HMAC::key_schedule(const byte key[], u32bit length)
+void HMAC::key_schedule(const byte key[], size_t length)
{
hash->clear();
std::fill(i_key.begin(), i_key.end(), 0x36);
diff --git a/src/mac/hmac/hmac.h b/src/mac/hmac/hmac.h
index 3941baef9..33af62f6a 100644
--- a/src/mac/hmac/hmac.h
+++ b/src/mac/hmac/hmac.h
@@ -31,7 +31,8 @@ class BOTAN_DLL HMAC : public MessageAuthenticationCode
private:
void add_data(const byte[], size_t);
void final_result(byte[]);
- void key_schedule(const byte[], u32bit);
+ void key_schedule(const byte[], size_t);
+
HashFunction* hash;
SecureVector<byte> i_key, o_key;
};
diff --git a/src/mac/ssl3mac/ssl3_mac.cpp b/src/mac/ssl3mac/ssl3_mac.cpp
index fc8d652c6..ac71be43c 100644
--- a/src/mac/ssl3mac/ssl3_mac.cpp
+++ b/src/mac/ssl3mac/ssl3_mac.cpp
@@ -32,7 +32,7 @@ void SSL3_MAC::final_result(byte mac[])
/*
* SSL3-MAC Key Schedule
*/
-void SSL3_MAC::key_schedule(const byte key[], u32bit length)
+void SSL3_MAC::key_schedule(const byte key[], size_t length)
{
hash->clear();
std::fill(i_key.begin(), i_key.end(), 0x36);
diff --git a/src/mac/ssl3mac/ssl3_mac.h b/src/mac/ssl3mac/ssl3_mac.h
index 4d7b07dcc..50042f3d0 100644
--- a/src/mac/ssl3mac/ssl3_mac.h
+++ b/src/mac/ssl3mac/ssl3_mac.h
@@ -31,7 +31,7 @@ class BOTAN_DLL SSL3_MAC : public MessageAuthenticationCode
private:
void add_data(const byte[], size_t);
void final_result(byte[]);
- void key_schedule(const byte[], u32bit);
+ void key_schedule(const byte[], size_t);
HashFunction* hash;
SecureVector<byte> i_key, o_key;
diff --git a/src/mac/x919_mac/x919_mac.cpp b/src/mac/x919_mac/x919_mac.cpp
index ef812ff81..330ca0043 100644
--- a/src/mac/x919_mac/x919_mac.cpp
+++ b/src/mac/x919_mac/x919_mac.cpp
@@ -53,7 +53,7 @@ void ANSI_X919_MAC::final_result(byte mac[])
/*
* ANSI X9.19 MAC Key Schedule
*/
-void ANSI_X919_MAC::key_schedule(const byte key[], u32bit length)
+void ANSI_X919_MAC::key_schedule(const byte key[], size_t length)
{
e->set_key(key, 8);
if(length == 8) d->set_key(key, 8);
diff --git a/src/mac/x919_mac/x919_mac.h b/src/mac/x919_mac/x919_mac.h
index a1710b654..e9fe56c8d 100644
--- a/src/mac/x919_mac/x919_mac.h
+++ b/src/mac/x919_mac/x919_mac.h
@@ -31,7 +31,7 @@ class BOTAN_DLL ANSI_X919_MAC : public MessageAuthenticationCode
private:
void add_data(const byte[], size_t);
void final_result(byte[]);
- void key_schedule(const byte[], u32bit);
+ void key_schedule(const byte[], size_t);
BlockCipher* e;
BlockCipher* d;