Annotation of embedaddon/strongswan/src/libstrongswan/plugins/af_alg/af_alg_hasher.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:  * Copyright (C) 2010 Martin Willi
                      3:  * Copyright (C) 2010 revosec AG
                      4:  *
                      5:  * This program is free software; you can redistribute it and/or modify it
                      6:  * under the terms of the GNU General Public License as published by the
                      7:  * Free Software Foundation; either version 2 of the License, or (at your
                      8:  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
                      9:  *
                     10:  * This program is distributed in the hope that it will be useful, but
                     11:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                     12:  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
                     13:  * for more details.
                     14:  */
                     15: 
                     16: /**
                     17:  * @defgroup af_alg_hasher af_alg_hasher
                     18:  * @{ @ingroup af_alg
                     19:  */
                     20: 
                     21: #ifndef af_alg_HASHER_H_
                     22: #define af_alg_HASHER_H_
                     23: 
                     24: typedef struct af_alg_hasher_t af_alg_hasher_t;
                     25: 
                     26: #include <plugins/plugin.h>
                     27: #include <crypto/hashers/hasher.h>
                     28: 
                     29: /** Number of hashers */
                     30: #define AF_ALG_HASHER 7
                     31: 
                     32: /**
                     33:  * Implementation of hashers using AF_ALG.
                     34:  */
                     35: struct af_alg_hasher_t {
                     36: 
                     37:        /**
                     38:         * Implements hasher_t interface.
                     39:         */
                     40:        hasher_t hasher;
                     41: };
                     42: 
                     43: /**
                     44:  * Constructor to create af_alg_hasher_t.
                     45:  *
                     46:  * @param algo                 algorithm
                     47:  * @return                             af_alg_hasher_t, NULL if not supported
                     48:  */
                     49: af_alg_hasher_t *af_alg_hasher_create(hash_algorithm_t algo);
                     50: 
                     51: /**
                     52:  * Probe algorithms and return plugin features.
                     53:  *
                     54:  * @param features             plugin features to create
                     55:  * @param pos                  current position in deps
                     56:  */
                     57: void af_alg_hasher_probe(plugin_feature_t *features, int *pos);
                     58: 
                     59: #endif /** af_alg_HASHER_H_ @}*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>