diff options
author | Bryan Ischo <bryan@ischo.com> | 2008-08-25 02:44:01 +0000 |
---|---|---|
committer | Bryan Ischo <bryan@ischo.com> | 2008-08-25 02:44:01 +0000 |
commit | e712e0ce461e76d5f29624568bca55fc0409cc3b (patch) | |
tree | 9e05d006a2ae3cfc88636d2b09d7ce99ad22fc92 /inc | |
parent | c1fec0ac751c8139bd25e6c04530d36404e2aa61 (diff) | |
download | ceph-libs3-e712e0ce461e76d5f29624568bca55fc0409cc3b.tar.gz |
* Clean up stuff
Diffstat (limited to 'inc')
-rw-r--r-- | inc/crypt.h | 37 | ||||
-rw-r--r-- | inc/util.h | 9 |
2 files changed, 9 insertions, 37 deletions
diff --git a/inc/crypt.h b/inc/crypt.h deleted file mode 100644 index 5ae3f68..0000000 --- a/inc/crypt.h +++ /dev/null @@ -1,37 +0,0 @@ -/** ************************************************************************** - * crypt.h - * - * Copyright 2008 Bryan Ischo <bryan@ischo.com> - * - * This file is part of libs3. - * - * libs3 is free software: you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation, version 3 of the License. - * - * In addition, as a special exception, the copyright holders give - * permission to link the code of this library and its programs with the - * OpenSSL library, and distribute linked combinations including the two. - * - * libs3 is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License version 3 - * along with libs3, in a file named COPYING. If not, see - * <http://www.gnu.org/licenses/>. - * - ************************************************************************** **/ - -#ifndef CRYPT_H -#define CRYPT_H - -// Private implementation of cryptography functions needed by libs3 - -// Compute the HMAC-SHA-1 of the given message using the given key, results -// placed in hmac -void HMAC_SHA1(unsigned char hmac[20], const unsigned char *key, int key_len, - const unsigned char *message, int message_len); - -#endif // CRYPT_H @@ -29,6 +29,7 @@ #include <curl/curl.h> #include <curl/multi.h> +#include <stdint.h> #include "libs3.h" @@ -74,5 +75,13 @@ uint64_t parseUnsignedInt(const char *str); // to [out]. int base64Encode(const unsigned char *in, int inLen, unsigned char *out); +// Compute HMAC-SHA-1 with key [key] and message [message], storing result +// in [hmac] +void HMAC_SHA1(unsigned char hmac[20], const unsigned char *key, int key_len, + const unsigned char *message, int message_len); + +// Compute a 64-bit hash values given a set of bytes +uint64_t hash(const unsigned char *k, int length); + #endif /* UTIL_H */ |