WizardsToolkit  1.0.7
secret.c File Reference
#include "wizard/studio.h"
#include "wizard/cipher.h"
#include "wizard/exception.h"
#include "wizard/exception-private.h"
#include "wizard/hmac.h"
#include "wizard/keyring.h"
#include "wizard/memory_.h"
#include "wizard/passphrase.h"
#include "wizard/random_.h"
#include "wizard/secret.h"
Include dependency graph for secret.c:

Go to the source code of this file.

Data Structures

struct  _SecretInfo

Defines

#define SecretKeyCipher   AESCipher
#define SecretKeyMode   CTRMode
#define SecretKeyHash   SHA256Hash
#define SecretRandomHash   SHA256Hash

Functions

WizardExport SecretInfoAcquireSecretInfo (const char *path, const HashType hash, const size_t key_length)
WizardExport WizardBooleanType AuthenticateSecretKey (SecretInfo *secret_info, ExceptionInfo *exception)
WizardExport SecretInfoDestroySecretInfo (SecretInfo *secret_info)
WizardExport WizardBooleanType GenerateSecretKey (SecretInfo *secret_info, ExceptionInfo *exception)
WizardExport const StringInfoGetSecretId (const SecretInfo *secret_info)
WizardExport const StringInfoGetSecretKey (const SecretInfo *secret_info)
WizardExport size_t GetSecretKeyLength (const SecretInfo *secret_info)
WizardExport const char * GetSecretPassphrase (const SecretInfo *secret_info)
WizardExport void SetSecretId (SecretInfo *secret_info, const StringInfo *id)
WizardExport void SetSecretKeyLength (SecretInfo *secret_info, const size_t key_length)
WizardExport void SetSecretPassphrase (SecretInfo *secret_info, const char *passphrase)

Define Documentation

#define SecretKeyCipher   AESCipher

Definition at line 57 of file secret.c.

Referenced by AcquireSecretInfo().

#define SecretKeyHash   SHA256Hash

Definition at line 59 of file secret.c.

#define SecretKeyMode   CTRMode

Definition at line 58 of file secret.c.

Referenced by AcquireSecretInfo().

#define SecretRandomHash   SHA256Hash

Definition at line 60 of file secret.c.

Referenced by AcquireSecretInfo().


Function Documentation

WizardExport const StringInfo* GetSecretId ( const SecretInfo secret_info)
WizardExport const StringInfo* GetSecretKey ( const SecretInfo secret_info)
WizardExport size_t GetSecretKeyLength ( const SecretInfo secret_info)
WizardExport const char* GetSecretPassphrase ( const SecretInfo secret_info)
WizardExport void SetSecretId ( SecretInfo secret_info,
const StringInfo id 
)

Definition at line 482 of file secret.c.

References _SecretInfo::id, DestroyStringInfo(), and CloneStringInfo().

Referenced by SetAuthenticateId().

WizardExport void SetSecretKeyLength ( SecretInfo secret_info,
const size_t  key_length 
)
WizardExport void SetSecretPassphrase ( SecretInfo secret_info,
const char *  passphrase 
)

Definition at line 547 of file secret.c.

References _SecretInfo::passphrase, DestroyString(), and ConstantString().

Referenced by SetAuthenticatePassphrase().