42 lines
880 B
C
Executable File
42 lines
880 B
C
Executable File
#ifndef LIBAOS_UTIL_H
|
|
#define LIBAOS_UTIL_H
|
|
#include "sf_type.h"
|
|
|
|
#ifdef __cplusplus
|
|
#if __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#define APR_SHA1_DIGESTSIZE 20
|
|
|
|
/**
|
|
* base64 encode bytes. The output buffer must have at least
|
|
* ((4 * (inLen + 1)) / 3) bytes in it. Returns the number of bytes written
|
|
* to [out].
|
|
*/
|
|
int aos_base64_encode(const UINT8 *in, int inLen, UINT8 *out);
|
|
|
|
/**
|
|
* Compute HMAC-SHA-1 with key [key] and message [message], storing result
|
|
* in [hmac]
|
|
*/
|
|
void HMAC_SHA1(UINT8 hmac[20], const UINT8 *key, int key_len,
|
|
const UINT8 *message, int message_len);
|
|
|
|
/*void oss_sign_headers(aos_pool_t *p, const aos_string_t *signstr, const aos_string_t *access_key_id,
|
|
const aos_string_t *access_key_secret, aos_table_t *headers);*/
|
|
|
|
void oss_sign_headers();
|
|
#ifdef __cplusplus
|
|
#if __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
#endif
|