MagickCore 7.0.10
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
 

Macros

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

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)
 

Macro Definition Documentation

◆ SecretKeyCipher

#define SecretKeyCipher   AESCipher

Definition at line 57 of file secret.c.

◆ SecretKeyHash

#define SecretKeyHash   SHA2256Hash

Definition at line 59 of file secret.c.

◆ SecretKeyMode

#define SecretKeyMode   CTRMode

Definition at line 58 of file secret.c.

◆ SecretRandomHash

#define SecretRandomHash   SHA2256Hash

Definition at line 60 of file secret.c.

Function Documentation

◆ AcquireSecretInfo()

◆ AuthenticateSecretKey()

◆ DestroySecretInfo()

◆ GenerateSecretKey()

◆ GetSecretId()

WizardExport const StringInfo * GetSecretId ( const SecretInfo secret_info)

◆ GetSecretKey()

WizardExport const StringInfo * GetSecretKey ( const SecretInfo secret_info)

◆ GetSecretKeyLength()

WizardExport size_t GetSecretKeyLength ( const SecretInfo secret_info)

◆ GetSecretPassphrase()

WizardExport const char * GetSecretPassphrase ( const SecretInfo secret_info)

◆ SetSecretId()

WizardExport void SetSecretId ( SecretInfo secret_info,
const StringInfo id 
)

Definition at line 482 of file secret.c.

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

Referenced by SetAuthenticateId().

◆ SetSecretKeyLength()

WizardExport void SetSecretKeyLength ( SecretInfo secret_info,
const size_t  key_length 
)

◆ SetSecretPassphrase()

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

Definition at line 547 of file secret.c.

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

Referenced by SetAuthenticatePassphrase().