|
WizardsToolkit
1.0.7
|
#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"
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 SecretInfo * | AcquireSecretInfo (const char *path, const HashType hash, const size_t key_length) |
| WizardExport WizardBooleanType | AuthenticateSecretKey (SecretInfo *secret_info, ExceptionInfo *exception) |
| WizardExport SecretInfo * | DestroySecretInfo (SecretInfo *secret_info) |
| WizardExport WizardBooleanType | GenerateSecretKey (SecretInfo *secret_info, ExceptionInfo *exception) |
| 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) |
| WizardExport void | SetSecretKeyLength (SecretInfo *secret_info, const size_t key_length) |
| WizardExport void | SetSecretPassphrase (SecretInfo *secret_info, const char *passphrase) |
| #define SecretKeyCipher AESCipher |
Definition at line 57 of file secret.c.
Referenced by AcquireSecretInfo().
| #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().
| WizardExport SecretInfo* AcquireSecretInfo | ( | const char * | path, |
| const HashType | hash, | ||
| const size_t | key_length | ||
| ) |
Definition at line 124 of file secret.c.
References AcquireWizardMemory(), ThrowWizardFatalError, AuthenticateDomain, MemoryError, ResetWizardMemory(), _SecretInfo::key_length, _SecretInfo::keyring_info, AcquireKeyringInfo(), _SecretInfo::cipher_info, AcquireCipherInfo(), SecretKeyCipher, SecretKeyMode, _SecretInfo::nonce, GenerateCipherNonce(), _SecretInfo::hmac_info, AcquireHMACInfo(), _SecretInfo::random_info, AcquireRandomInfo(), SecretRandomHash, _SecretInfo::timestamp, _SecretInfo::signature, and WizardSignature.
Referenced by AcquireAuthenticateInfo().
| WizardExport WizardBooleanType AuthenticateSecretKey | ( | SecretInfo * | secret_info, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 170 of file secret.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, AuthenticateDomain, _SecretInfo::signature, WizardSignature, SetKeyringId(), _SecretInfo::keyring_info, _SecretInfo::id, ExportKeyringKey(), WizardFalse, _SecretInfo::passphrase, GetPassphrase(), FileToStringInfo(), SetCipherKey(), _SecretInfo::cipher_info, SetCipherNonce(), GetKeyringNonce(), _SecretInfo::key, DestroyStringInfo(), CloneStringInfo(), GetKeyringKey(), DecipherCipher(), ConstructHMAC(), _SecretInfo::hmac_info, GetHMACDigest(), CompareStringInfo(), and WizardTrue.
Referenced by AuthenticateKey().
| WizardExport SecretInfo* DestroySecretInfo | ( | SecretInfo * | secret_info | ) |
Definition at line 234 of file secret.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, AuthenticateDomain, _SecretInfo::signature, WizardSignature, _SecretInfo::random_info, DestroyRandomInfo(), _SecretInfo::hmac_info, DestroyHMACInfo(), _SecretInfo::cipher_info, DestroyCipherInfo(), _SecretInfo::keyring_info, DestroyKeyringInfo(), _SecretInfo::nonce, DestroyStringInfo(), _SecretInfo::key, _SecretInfo::id, _SecretInfo::digest, and RelinquishWizardMemory().
Referenced by DestroyAuthenticateInfo().
| WizardExport WizardBooleanType GenerateSecretKey | ( | SecretInfo * | secret_info, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 286 of file secret.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, AuthenticateDomain, _SecretInfo::signature, WizardSignature, _SecretInfo::passphrase, GetPassphrase(), FileToStringInfo(), WizardFalse, AcquireExceptionInfo(), _SecretInfo::key, DestroyStringInfo(), GetRandomKey(), _SecretInfo::random_info, _SecretInfo::key_length, ConstructHMAC(), _SecretInfo::hmac_info, _SecretInfo::id, CloneStringInfo(), GetHMACDigest(), SetKeyringId(), _SecretInfo::keyring_info, ExportKeyringKey(), DestroyExceptionInfo(), SetKeyringKey(), SetKeyringNonce(), _SecretInfo::nonce, SetCipherKey(), _SecretInfo::cipher_info, SetCipherNonce(), GetKeyringNonce(), GetKeyringKey(), EncipherCipher(), ImportKeyringKey(), and WizardTrue.
Referenced by GenerateAuthenticateKey().
| WizardExport const StringInfo* GetSecretId | ( | const SecretInfo * | secret_info | ) |
Definition at line 360 of file secret.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, AuthenticateDomain, _SecretInfo::signature, WizardSignature, and _SecretInfo::id.
Referenced by GetAuthenticateId().
| WizardExport const StringInfo* GetSecretKey | ( | const SecretInfo * | secret_info | ) |
Definition at line 390 of file secret.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, AuthenticateDomain, _SecretInfo::signature, WizardSignature, and _SecretInfo::key.
Referenced by GetAuthenticateKey().
| WizardExport size_t GetSecretKeyLength | ( | const SecretInfo * | secret_info | ) |
Definition at line 420 of file secret.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, AuthenticateDomain, _SecretInfo::signature, WizardSignature, and _SecretInfo::key_length.
Referenced by GetAuthenticateKeyLength().
| WizardExport const char* GetSecretPassphrase | ( | const SecretInfo * | secret_info | ) |
Definition at line 450 of file secret.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, AuthenticateDomain, _SecretInfo::signature, WizardSignature, and _SecretInfo::passphrase.
Referenced by GetAuthenticatePassphrase().
| 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 | ||
| ) |
Definition at line 514 of file secret.c.
References LogWizardEvent(), TraceEvent, GetWizardModule, WizardAssert, AuthenticateDomain, _SecretInfo::signature, WizardSignature, and _SecretInfo::key_length.
Referenced by SetAuthenticateKeyLength().
| 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().