|
opensc
NPCI secure-component & UPI Lite / Lite X wallet reimplementation
|
The NPCICLVAULT codec: an AES-GCM-encrypted JSON doc, separately signed, with tamper-reset. More...


Go to the source code of this file.
Enumerations | |
| enum | { LITE_OK = 0 , LITE_ERR = -1 , LITE_ERR_ABSENT = -2 , LITE_ERR_TAMPER = -3 } |
| Shared return codes for the vault/wallet layer. More... | |
Functions | |
| int | lite_vault_open (lite_env *env, const char *alias) |
| Ensures the vault's AES and signing keys exist and a valid encrypted record is stored. | |
| int | lite_vault_reset (lite_env *env, const char *alias) |
| Replaces vault contents with an encrypted "{}" under freshly generated keys. | |
| long | lite_vault_get (lite_env *env, const char *alias, const char *key, char *out, size_t cap) |
Reads one top-level string field into out. Returns length, LITE_ERR_ABSENT, or LITE_ERR_TAMPER. | |
| int | lite_vault_set (lite_env *env, const char *alias, const char *key, const char *val) |
| Read-modify-write of one field. Verifies the current record first; resets on tamper. 0 on success. | |
The NPCICLVAULT codec: an AES-GCM-encrypted JSON doc, separately signed, with tamper-reset.