Lines Matching refs:key
63 static char * encrypt_var(char *varname, char *ctext, int ctext_len, char *ptext, int *ptext_len,char *key, int keylen);
64 static char * decrypt_var(char *varname, char *ptext, int ptext_len, char *ctext, int *ctext_len,char *key, int keylen);
3768 char *key = websGetVar(wp, "wl_wpa_psk", "");
3769 if (!key || !strcmp(key, "")) {
4675 e.key = vblock[count].name;
4712 e.key = varname;
4752 e.key = tmp;
4779 e.key = tmp;
4794 e.key = tmp;
5899 char key[NVRAM_FILEKEYSIZE];
6042 /* Regenerate encryption key */
6043 memset(key,0,NVRAM_FILEKEYSIZE);
6045 (unsigned char*)salt,sizeof(salt),key,sizeof(key));
6056 key,sizeof(key),checksum);
6170 if (!decrypt_var(varname,ptr,strlen(ptr),buf,&bufsize,key,sizeof(key))){
6256 save_nvram_var(char *name, char *var_val,char *buf, int buflen,char *key, int keylen)
6265 assert(key);
6292 var_val = encrypt_var(name,var_val,strlen(var_val),tmp,&len,key,keylen);
6323 char key[NVRAM_FILEKEYSIZE];
6404 (unsigned char*)salt,sizeof(salt),key,sizeof(key));
6417 sizeof(tmp_buf),key,sizeof(key));
6447 hmac_sha1((unsigned char*)post_buf,sizeof(struct pb),key,sizeof(key),checksum);
6489 * using the provided key.
6496 decrypt_var(char *varname,char *ctext, int ctext_len, char *ptext, int *ptext_len,char *key, int keylen)
6505 assert(key);
6520 if (aes_unwrap(keylen,key,len,tmp,ptext)) return NULL;
6535 * using the provided key.
6542 encrypt_var(char *varname,char *ptext, int ptext_len, char *ctext, int *ctext_len,char *key, int keylen)
6552 assert(key);
6581 if (aes_wrap(keylen,key,newlen,buf,ctext)){