2014-09-07 15:08:27 +00:00
|
|
|
/*
|
|
|
|
* s3fs - FUSE-based file system backed by Amazon S3
|
|
|
|
*
|
2017-05-07 11:24:17 +00:00
|
|
|
* Copyright(C) 2007 Randy Rizun <rrizun@gmail.com>
|
2014-09-07 15:08:27 +00:00
|
|
|
*
|
|
|
|
* This program 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; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
2020-08-22 12:40:53 +00:00
|
|
|
|
2014-08-25 10:18:34 +00:00
|
|
|
#ifndef S3FS_AUTH_H_
|
2014-05-06 14:23:05 +00:00
|
|
|
#define S3FS_AUTH_H_
|
|
|
|
|
2015-08-19 18:22:30 +00:00
|
|
|
#include <string>
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
2014-05-06 14:23:05 +00:00
|
|
|
//-------------------------------------------------------------------
|
|
|
|
// Utility functions for Authentication
|
|
|
|
//-------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// in common_auth.cpp
|
|
|
|
//
|
|
|
|
std::string s3fs_get_content_md5(int fd);
|
2020-09-14 10:00:09 +00:00
|
|
|
std::string s3fs_sha256_hex_fd(int fd, off_t start, off_t size);
|
2014-05-06 14:23:05 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// in xxxxxx_auth.cpp
|
|
|
|
//
|
2020-09-20 22:02:06 +00:00
|
|
|
const char* s3fs_crypt_lib_name();
|
|
|
|
bool s3fs_init_global_ssl();
|
|
|
|
bool s3fs_destroy_global_ssl();
|
|
|
|
bool s3fs_init_crypt_mutex();
|
|
|
|
bool s3fs_destroy_crypt_mutex();
|
2014-05-06 14:23:05 +00:00
|
|
|
bool s3fs_HMAC(const void* key, size_t keylen, const unsigned char* data, size_t datalen, unsigned char** digest, unsigned int* digestlen);
|
2015-01-28 17:13:11 +00:00
|
|
|
bool s3fs_HMAC256(const void* key, size_t keylen, const unsigned char* data, size_t datalen, unsigned char** digest, unsigned int* digestlen);
|
2020-09-20 22:02:06 +00:00
|
|
|
size_t get_md5_digest_length();
|
2020-09-14 10:00:09 +00:00
|
|
|
unsigned char* s3fs_md5_fd(int fd, off_t start, off_t size);
|
2021-06-13 03:50:07 +00:00
|
|
|
bool s3fs_sha256(const unsigned char* data, size_t datalen, unsigned char** digest, unsigned int* digestlen);
|
2020-09-20 22:02:06 +00:00
|
|
|
size_t get_sha256_digest_length();
|
2020-09-14 10:00:09 +00:00
|
|
|
unsigned char* s3fs_sha256_fd(int fd, off_t start, off_t size);
|
2014-05-06 14:23:05 +00:00
|
|
|
|
|
|
|
#endif // S3FS_AUTH_H_
|
2014-09-07 15:08:27 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Local variables:
|
2020-08-22 12:40:53 +00:00
|
|
|
* tab-width: 4
|
|
|
|
* c-basic-offset: 4
|
2014-09-07 15:08:27 +00:00
|
|
|
* End:
|
2020-08-22 12:40:53 +00:00
|
|
|
* vim600: expandtab sw=4 ts=4 fdm=marker
|
|
|
|
* vim<600: expandtab sw=4 ts=4
|
2014-09-07 15:08:27 +00:00
|
|
|
*/
|