Typedefs | Functions

# secret.h File Reference

`#include "wizard/cipher.h"`
`#include "wizard/exception.h"`
`#include "wizard/hash.h"`
`#include "wizard/hmac.h"`
`#include "wizard/keyring.h"`
`#include "wizard/random_.h"`

Go to the source code of this file.

## Typedefs

typedef struct _SecretInfo | SecretInfo

## Functions

WizardExport const char * | GetSecretPassphrase (const SecretInfo *)
WizardExport const StringInfo * | GetSecretId (const SecretInfo *)
WizardExport const StringInfo ** | GetSecretKey (const SecretInfo *)
WizardExport SecretInfo * | AcquireSecretInfo (const char *, const HashType, const size_t)
WizardExport SecretInfo ** | DestroySecretInfo (SecretInfo *)
WizardExport size_t | GetSecretKeyLength (const SecretInfo *)
WizardExport void | SetSecretId (SecretInfo *, const StringInfo *)
WizardExport void | SetSecretKeyLength (SecretInfo *, const size_t)
WizardExport void | SetSecretPassphrase (SecretInfo *, const char *)
WizardExport WizardBooleanType | AuthenticateSecretKey (SecretInfo *, ExceptionInfo *)
WizardExport WizardBooleanType | GenerateSecretKey (SecretInfo *, ExceptionInfo *)

## Typedef Documentation

typedef struct _SecretInfo SecretInfo

## Function Documentation

WizardExport SecretInfo* AcquireSecretInfo | ( | const char * | ,
|  | const | HashType,
|  | const | size_t |
| ) |  |  |

WizardExport WizardBooleanType AuthenticateSecretKey | ( | SecretInfo * | ,
|  | ExceptionInfo * |  |
| ) |  |  |

WizardExport SecretInfo* * DestroySecretInfo | ( | SecretInfo * |  | ) |

References AuthenticateDomain, _SecretInfo::cipher_info, DestroyCipherInfo(), DestroyHMACInfo(), DestroyKeyringInfo(), DestroyRandomInfo(), DestroyStringInfo(), _SecretInfo::digest, GetWizardModule, _SecretInfo::hmac_info, _SecretInfo::id, _SecretInfo::key, _SecretInfo::keyring_info, LogWizardEvent(), _SecretInfo::nonce, _SecretInfo::random_info, RelinquishWizardMemory(), _SecretInfo::signature, TraceEvent, WizardAssert, and WizardSignature.

Referenced by DestroyAuthenticateInfo().

WizardExport WizardBooleanType GenerateSecretKey | ( | SecretInfo * | ,
|  | ExceptionInfo * |  |
| ) |  |  |

References AcquireExceptionInfo(), AuthenticateDomain, _SecretInfo::cipher_info, CloneStringInfo(), ConstructHMAC(), DestroyExceptionInfo(), DestroyStringInfo(), EncipherCipher(), ExportKeyringKey(), FileToStringInfo(), GetHMACDigest(), GetKeyringKey(), GetKeyringNonce(), GetPassphrase(), GetRandomKey(), GetWizardModule, _SecretInfo::hmac_info, _SecretInfo::id, ImportKeyringKey(), _SecretInfo::key, _SecretInfo::key_length, _SecretInfo::keyring_info, LogWizardEvent(), _SecretInfo::nonce, _SecretInfo::passphrase, _SecretInfo::random_info, SetCipherKey(), SetCipherNonce(), SetKeyringId(), SetKeyringKey(), SetKeyringNonce(), _SecretInfo::signature, TraceEvent, WizardAssert, WizardFalse, WizardSignature, and WizardTrue.

Referenced by GenerateAuthenticateKey().

WizardExport const StringInfo* GetSecretId | ( | const SecretInfo * |  | ) |

WizardExport const StringInfo* * GetSecretKey | ( | const SecretInfo * |  | ) |

References AuthenticateDomain, GetWizardModule, _SecretInfo::key, LogWizardEvent(), _SecretInfo::signature, TraceEvent, WizardAssert, and WizardSignature.

Referenced by GetAuthenticateKey().

WizardExport size_t GetSecretKeyLength | ( | const SecretInfo * |  | ) |

References AuthenticateDomain, GetWizardModule, _SecretInfo::key_length, LogWizardEvent(), _SecretInfo::signature, TraceEvent, WizardAssert, and WizardSignature.

Referenced by GetAuthenticateKeyLength().

WizardExport const char* GetSecretPassphrase | ( | const SecretInfo * |  | ) |

References AuthenticateDomain, GetWizardModule, LogWizardEvent(), _SecretInfo::passphrase, _SecretInfo::signature, TraceEvent, WizardAssert, and WizardSignature.

Referenced by GetAuthenticatePassphrase().

WizardExport void SetSecretId | ( | SecretInfo * | ,
|  | const StringInfo * |  |
| ) |  |  |

WizardExport void SetSecretKeyLength | ( | SecretInfo * | ,
|  | const | size_t |
| ) |  |  |

WizardExport void SetSecretPassphrase | ( | SecretInfo * | ,
|  | const char * |  |
| ) |  |  |

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

Referenced by SetAuthenticatePassphrase().