challenger

OAuth 2.0-based authentication service that validates user can receive messages at a certain address
Log | Files | Refs | Submodules | README | LICENSE

challenger_util.h (1493B)


      1 /*
      2   This file is part of CHALLENGER
      3   Copyright (C) 2023 Taler Systems SA
      4 
      5   CHALLENGER is free software; you can redistribute it and/or modify it under the
      6   terms of the GNU General Public License as published by the Free Software
      7   Foundation; either version 3, or (at your option) any later version.
      8 
      9   CHALLENGER is distributed in the hope that it will be useful, but WITHOUT ANY
     10   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11   A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     12 
     13   You should have received a copy of the GNU General Public License along with
     14   CHALLENGER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15 */
     16 /**
     17  * @file include/challenger_util.h
     18  * @brief Interface for common utility functions
     19  * @author Christian Grothoff
     20  */
     21 #ifndef CHALLENGER_UTIL_H
     22 #define CHALLENGER_UTIL_H
     23 
     24 #include <gnunet/gnunet_util_lib.h>
     25 
     26 
     27 /**
     28  * Nonce used to uniquely (and unpredictably) identify validations.
     29  */
     30 struct CHALLENGER_ValidationNonceP
     31 {
     32   /**
     33    * 256-bit nonce used to identify validations.
     34    */
     35   uint32_t value[256 / 32];
     36 };
     37 
     38 
     39 /**
     40  * Nonce to uniquely (and unpredictably) identify access tokens.
     41  */
     42 struct CHALLENGER_AccessTokenP
     43 {
     44   /**
     45    * 256-bit nonce used to identify grants.
     46    */
     47   uint32_t value[256 / 32];
     48 };
     49 
     50 
     51 /**
     52  * Return project data used by Challenger.
     53  *
     54  * @return project data for challenger
     55  */
     56 const struct GNUNET_OS_ProjectData *
     57 CHALLENGER_project_data (void);
     58 
     59 
     60 #endif