fareqr.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (c) 2021 Clementine Computing LLC.
  3. *
  4. * This file is part of PopuFare.
  5. *
  6. * PopuFare is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * PopuFare is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public License
  17. * along with PopuFare. If not, see <https://www.gnu.org/licenses/>.
  18. *
  19. */
  20. #ifndef POPUFARE_FAREQR_H
  21. #define POPUFARE_FAREQR_H
  22. #include <stdio.h>
  23. #include <stdlib.h>
  24. #include <string.h>
  25. #include <stdint.h>
  26. #include <openssl/conf.h>
  27. #include <openssl/evp.h>
  28. #include <openssl/err.h>
  29. #include <ctype.h>
  30. #include "b64.h"
  31. #include "../common/common_config.h"
  32. #include "b64.h"
  33. int fareqr_encode(char *tok_public, char *tok_secret, char *tok_cred, char *fareqr_str);
  34. int fareqr_decode(char *fareqr_s, char *check_pub, char *tok_secret, char *dst_cred);
  35. int fareqr_lookup_seed_secret(char *seedfn, char *pub, char *priv);
  36. int fareqr_lookup_decode(char *seedfn, char *fareqr_s, char *dst_cred);
  37. #endif