/**************************************************************************** * * Copyright (c) 2001 Novell, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, contact Novell, Inc. * ****************************************************************************/ #ifndef BONGO_AUTH_SECURITY_H #define BONGO_AUTH_SECURITY_H #include #include #define BONGO_AUTH_TOTP_SECRET_SIZE 64 #define BONGO_AUTH_CREDENTIAL_SIZE 48 #define BONGO_AUTH_HASH_SIZE 128 int BongoAuthSecurityInit(void); void BongoAuthSecurityDone(void); int BongoAuthGenerateTotpSecret(char *result, size_t result_size); int BongoAuthVerifyTotp(const char *secret, const char *otp, time_t now); int BongoAuthGenerateCredential(char *result, size_t result_size); int BongoAuthHashCredential(const char *credential, char *result, size_t result_size); int BongoAuthVerifyCredential(const char *encoded, const char *credential); #endif