-rw-r--r-- | lib/secret.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/secret.cc b/lib/secret.cc index 632a2ca..d538890 100644 --- a/lib/secret.cc +++ b/lib/secret.cc @@ -16,5 +16,3 @@ namespace opkele { - void secret_t::enxor_to_base64(const unsigned char *key_sha1,string& rv) const { - if(size()!=20) - throw bad_input(OPKELE_CP_ "wrong secret size"); + void secret_t::enxor_to_base64(const unsigned char *key_d,string& rv) const { vector<unsigned char> tmp; @@ -22,3 +20,3 @@ namespace opkele { begin(), end(), - key_sha1, + key_d, back_insert_iterator<vector<unsigned char> >(tmp), @@ -28,3 +26,3 @@ namespace opkele { - void secret_t::enxor_from_base64(const unsigned char *key_sha1,const string& b64) { + void secret_t::enxor_from_base64(const unsigned char *key_d,const string& b64) { clear(); @@ -33,3 +31,3 @@ namespace opkele { begin(), end(), - key_sha1, + key_d, begin(), @@ -39,4 +37,2 @@ namespace opkele { void secret_t::to_base64(string& rv) const { - if(size()!=20) - throw bad_input(OPKELE_CP_ "wrong secret size"); rv = util::encode_base64(&(front()),size()); |