mirror of https://gitlab.com/octospacc/SmolOTP.git
28 lines
610 B
C
28 lines
610 B
C
/*
|
|
*
|
|
* TOTP: Time-Based One-Time Password Algorithm
|
|
* Copyright (c) 2017, fmount <fmount9@autistici.org>
|
|
*
|
|
* This software is distributed under MIT License
|
|
*
|
|
* Compute the hmac using openssl library.
|
|
* SHA-1 engine is used by default, but you can pass another one,
|
|
*
|
|
* e.g EVP_md5(), EVP_sha224, EVP_sha512, etc
|
|
*
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
|
|
#include "plist.h"
|
|
|
|
extern NODE *provider_list;
|
|
|
|
PROVIDER split_str(char *spl, char delim);
|
|
void process_provider(NODE **plist, char *line);
|
|
void load_providers(char *fname);
|