Lines Matching +full:key +full:- +full:string
10 * 1. A string representing an IP-address: stored at id=1, data="192.168.1.1"
11 * 2. A binary blob representing a key: stored at id=2, data=FF FE FD FC FB FA
14 * 4. A string: stored at id=4, data="DATA" (used to illustrate deletion of
23 * At the 10th reboot the string item with id=4 is deleted (or marked for
26 * At the 11th reboot the string item with id=4 can no longer be read with the
33 * latest values of address, key and reboot_counter is kept.
37 * SPDX-License-Identifier: Apache-2.0
44 #include <string.h>
72 uint8_t key[8], longarray[128]; in main() local
83 printk("Flash device %s is not ready\n", fs.flash_device->name); in main()
114 /* KEY_ID is used to store a key, lets see if we can read it from flash in main()
116 rc = nvs_read(&fs, KEY_ID, &key, sizeof(key)); in main()
118 printk("Id: %d, Key: ", KEY_ID); in main()
120 printk("%x ", key[n]); in main()
124 printk("No key found, adding it at id %d\n", KEY_ID); in main()
125 key[0] = 0xFF; in main()
126 key[1] = 0xFE; in main()
127 key[2] = 0xFD; in main()
128 key[3] = 0xFC; in main()
129 key[4] = 0xFB; in main()
130 key[5] = 0xFA; in main()
131 key[6] = 0xF9; in main()
132 key[7] = 0xF8; in main()
133 (void)nvs_write(&fs, KEY_ID, &key, sizeof(key)); in main()
226 cnt--; in main()