if you want secure flash without backdoor key, just below code:
/* NVOPT: KEYEN=0,FNORED=1,??=1,??=1,??=1,??=1,SEC01=0,SEC00=0 */
const unsigned char NVOPT_INIT @0x0000FFBF = 0x7C;
thus only mass erase can unsecure flash.
if you want secure flash with back door key. see attached sample code.