# openssl_hmac.h

Go to the documentation of this file.

    00001 /*
    00002  *   Copyright 2003-2004 The Apache Software Foundation.
    00003  *
    00004  *   Licensed under the Apache License, Version 2.0 (the "License");
    00005  *   you may not use this file except in compliance with the License.
    00006  *   You may obtain a copy of the License at
    00007  *
    00008  *       http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  *   Unless required by applicable law or agreed to in writing, software
    00011  *   distributed under the License is distributed on an "AS IS" BASIS,
    00012  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  *   See the License for the specific language governing permissions and
    00014  *   limitations under the License.
    00015  */
    00016
    00017 #include <openssl/sha.h>
    00018 #include <openssl/hmac.h>
    00019 #include <axutil_utils_defines.h>
    00020 #include <axis2_defines.h>
    00021 #include <axutil_env.h>
    00022 #include <oxs_buffer.h>
    00023 #include <oxs_key.h>
    00024
    00029 #ifndef OPENSSL_HMAC
    00030 #define OPENSSL_HMAC
    00031
    00032 #ifdef __cplusplus
    00033 extern "C" {
    00034 #endif
    00035
    00042         AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00043         openssl_hmac_sha1(const axutil_env_t *env,
    00044              oxs_key_t *secret,
    00045              oxs_buffer_t *input,
    00046              oxs_buffer_t *output);
    00047
    00048                 AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00049                 openssl_p_sha1(const axutil_env_t *env,
    00050                          oxs_key_t *secret,
    00051                          axis2_char_t *label,
    00052                          axis2_char_t *seed,
    00053                          oxs_key_t *derived_key);
    00054
    00055         AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00056         openssl_p_hash(const axutil_env_t *env,
    00057                         unsigned char *secret,
    00058             unsigned int secret_len,
    00059                         unsigned char *seed,
    00060                         unsigned int seed_len,
    00061                         unsigned char *output,
    00062                         unsigned int output_len);
    00063
    00064     /* @} */
    00065 #ifdef __cplusplus
    00066 }
    00067 #endif
    00068
    00069 #endif    /* OPENSSL_HMAC */