gwenhywfar  4.6.0beta
Functions
passwdstore.c File Reference
#include "passwdstore_p.h"
#include "i18n_l.h"
#include <gwenhywfar/gui.h>
#include <gwenhywfar/db.h>
#include <gwenhywfar/directory.h>
#include <gwenhywfar/fslock.h>
#include <gwenhywfar/mdigest.h>
#include <gwenhywfar/text.h>
#include <gwenhywfar/debug.h>
#include <gwenhywfar/smalltresor.h>
#include <errno.h>

Go to the source code of this file.

Functions

static int GWEN_PasswordStore__GetPassword (GWEN_PASSWD_STORE *sto, const char *token, char *buffer, int minLen, int maxLen)
 
static int GWEN_PasswordStore__SetPassword (GWEN_PASSWD_STORE *sto, const char *token, const char *secret)
 
static int GWEN_PasswordStore_CheckDigest (const uint8_t *t, uint32_t size, const uint8_t *h)
 
void GWEN_PasswordStore_ClearStoragePasswd (GWEN_PASSWD_STORE *sto)
 
static int GWEN_PasswordStore_Digest (const uint8_t *t, uint32_t size, GWEN_BUFFER *buf)
 
static int GWEN_PasswordStore_EncryptWriteFile (GWEN_PASSWD_STORE *sto, const uint8_t *sec, uint32_t len)
 
void GWEN_PasswordStore_free (GWEN_PASSWD_STORE *sto)
 
int GWEN_PasswordStore_GetPassword (GWEN_PASSWD_STORE *sto, const char *token, char *buffer, int minLen, int maxLen)
 
GWEN_PASSWD_STOREGWEN_PasswordStore_new (const char *fname)
 
static int GWEN_PasswordStore_ReadDecryptFile (GWEN_PASSWD_STORE *sto, GWEN_BUFFER *secbuf)
 
static int GWEN_PasswordStore_ReadFile (GWEN_PASSWD_STORE *sto)
 
static void GWEN_PasswordStore_SafeFreeDb (GWEN_PASSWD_STORE *sto)
 
int GWEN_PasswordStore_SetPassword (GWEN_PASSWD_STORE *sto, const char *token, const char *secret)
 
static int GWEN_PasswordStore_WriteFile (GWEN_PASSWD_STORE *sto)
 
static int readFile (const char *fname, GWEN_BUFFER *dbuf)
 
static int writeFile (const char *fname, const char *p, int len)
 
static int writeToFile (FILE *f, const char *p, int len)
 

Function Documentation

static int GWEN_PasswordStore__GetPassword ( GWEN_PASSWD_STORE sto,
const char *  token,
char *  buffer,
int  minLen,
int  maxLen 
)
static
static int GWEN_PasswordStore__SetPassword ( GWEN_PASSWD_STORE sto,
const char *  token,
const char *  secret 
)
static
static int GWEN_PasswordStore_CheckDigest ( const uint8_t *  t,
uint32_t  size,
const uint8_t *  h 
)
static
void GWEN_PasswordStore_ClearStoragePasswd ( GWEN_PASSWD_STORE sto)
static int GWEN_PasswordStore_Digest ( const uint8_t *  t,
uint32_t  size,
GWEN_BUFFER buf 
)
static
static int GWEN_PasswordStore_EncryptWriteFile ( GWEN_PASSWD_STORE sto,
const uint8_t *  sec,
uint32_t  len 
)
static
void GWEN_PasswordStore_free ( GWEN_PASSWD_STORE sto)
int GWEN_PasswordStore_GetPassword ( GWEN_PASSWD_STORE sto,
const char *  token,
char *  buffer,
int  minLen,
int  maxLen 
)
GWEN_PASSWD_STORE* GWEN_PasswordStore_new ( const char *  fname)

Definition at line 46 of file passwdstore.c.

References GWEN_NEW_OBJECT, and NULL.

Referenced by test10().

static int GWEN_PasswordStore_ReadDecryptFile ( GWEN_PASSWD_STORE sto,
GWEN_BUFFER secbuf 
)
static
static int GWEN_PasswordStore_ReadFile ( GWEN_PASSWD_STORE sto)
static
static void GWEN_PasswordStore_SafeFreeDb ( GWEN_PASSWD_STORE sto)
static
int GWEN_PasswordStore_SetPassword ( GWEN_PASSWD_STORE sto,
const char *  token,
const char *  secret 
)
static int GWEN_PasswordStore_WriteFile ( GWEN_PASSWD_STORE sto)
static
static int readFile ( const char *  fname,
GWEN_BUFFER dbuf 
)
static
static int writeFile ( const char *  fname,
const char *  p,
int  len 
)
static

Definition at line 158 of file passwdstore.c.

References DBG_ERROR, GWEN_ERROR_IO, GWEN_LOGDOMAIN, and writeToFile().

Referenced by GWEN_PasswordStore_EncryptWriteFile().

static int writeToFile ( FILE *  f,
const char *  p,
int  len 
)
static

Definition at line 134 of file passwdstore.c.

References DBG_ERROR, GWEN_ERROR_IO, and GWEN_LOGDOMAIN.

Referenced by writeFile().