fareqr.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 "../common/common_config.h"
  27. #include "b64.h"
  28. int fareqr_encode(char *tok_public, char *tok_secret, char *tok_cred, char *fareqr_str);
  29. int fareqr_decode(char *fareqr_s, char *check_pub, char *tok_secret, char *dst_cred);
  30. int fareqr_lookup_seed_secret(char *seedfn, char *pub, char *priv);
  31. #endif