trust_entropy.h

00001 /*
00002 * Licensed to the Apache Software Foundation (ASF) under one or more
00003 * contributor license agreements.  See the NOTICE file distributed with
00004 * this work for additional information regarding copyright ownership.
00005 * The ASF licenses this file to You under the Apache License, Version 2.0
00006 * (the "License"); you may not use this file except in compliance with
00007 * the License.  You may obtain a copy of the License at
00008 *
00009 *      http://www.apache.org/licenses/LICENSE-2.0
00010 *
00011 * Unless required by applicable law or agreed to in writing, software
00012 * distributed under the License is distributed on an "AS IS" BASIS,
00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014 * See the License for the specific language governing permissions and
00015 * limitations under the License.
00016 */
00017 
00018 #ifndef TRUST_ENTROPY_H
00019 #define TRUST_ENTROPY_H
00020 
00021 #include <axutil_utils.h>
00022 #include <axutil_string.h>
00023 #include <axutil_base64.h>
00024 #include <axiom_soap.h>
00025 #include <axiom.h>
00026 #include <trust_constants.h>
00027 #include <trust_util.h>
00028 
00029 
00030 #ifdef  __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034     
00035     #define BIN_SEC_ASSYM   "/AsymmetricKey"
00036     #define BIN_SEC_SYM     "/SymmetricKey"
00037     #define BIN_SEC_NONCE   "/Nonce"    
00038 
00039     typedef enum
00040     {
00041         BIN_SEC_TYPE_ERROR = -1,
00042         ASYMMETRIC ,
00043         SYMMETRIC,
00044         NONCE
00045     }trust_bin_sec_type_t;
00046 
00047     typedef struct trust_entropy trust_entropy_t;
00048 
00049     #define TRUST_BIN_SEC_TYPE_ATTR "Type"
00050             
00051     AXIS2_EXTERN trust_entropy_t * AXIS2_CALL
00052     trust_entropy_create(
00053         const axutil_env_t *env);
00054     
00055     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00056     trust_entropy_free(
00057         trust_entropy_t *entropy,
00058         const axutil_env_t *env);
00059     
00060     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00061     trust_entropy_deserialize(
00062         trust_entropy_t *entropy,
00063         const axutil_env_t *env,
00064         axiom_node_t *entropy_node);
00065     
00066     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
00067     trust_entropy_serialize(
00068         trust_entropy_t *entropy,
00069         const axutil_env_t *env,
00070         axiom_node_t *parent);
00071     
00072     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
00073     trust_entropy_get_binary_secret(
00074         trust_entropy_t *entropy,
00075         const axutil_env_t *env);
00076 
00077         AXIS2_EXTERN trust_bin_sec_type_t AXIS2_CALL
00078         trust_entropy_get_bin_sec_type_from_str(
00079         axis2_char_t *str,
00080         const axutil_env_t *env);
00081     
00082     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
00083         trust_entropy_get_str_for_bin_sec_type(
00084         trust_bin_sec_type_t type,
00085         const axutil_env_t *env);
00086     
00087     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00088     trust_entropy_set_binary_secret(
00089         trust_entropy_t *entropy,
00090         const axutil_env_t *env,
00091         axis2_char_t *bin_sec);
00092     
00093     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
00094     trust_entropy_get_other(
00095         trust_entropy_t *entropy,
00096         const axutil_env_t *env);
00097     
00098     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00099     trust_entropy_set_other(
00100         trust_entropy_t *entropy,
00101         const axutil_env_t *env,
00102         axiom_node_t *other_node);
00103     
00104     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
00105     trust_entropy_get_ns_uri(
00106         trust_entropy_t *entropy,
00107         const axutil_env_t *env);
00108     
00109     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00110     trust_entropy_set_ns_uri(
00111         trust_entropy_t *entropy,
00112         const axutil_env_t *env,
00113         axis2_char_t *ns_uri);
00114 
00115     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00116     trust_entropy_set_binary_secret_type(
00117         trust_entropy_t *entropy,
00118         const axutil_env_t *env,
00119         trust_bin_sec_type_t binsec_type);
00120 
00121 #ifdef  __cplusplus
00122 }
00123 #endif
00124 
00125 #endif                          /* _TRUST_ENTROPY_H */

Generated on Wed Oct 14 01:02:16 2009 for Rampart/C by  doxygen 1.5.7.1