Lines Matching defs:cache
3084 struct pw_cache *cache;
3087 cache = (struct pw_cache *)apr_table_get(r->connection->notes, pw_cache_note_name);
3088 if (cache != NULL) {
3089 if (strncmp(passwd, cache->vb.buf, cache->pwlen) == 0
3090 && strcmp(hash, cache->vb.buf + cache->pwlen) == 0) {
3091 return cache->result;
3094 cache->vb.strlen = 0;
3097 cache = apr_palloc(r->connection->pool, sizeof(struct pw_cache));
3098 ap_varbuf_init(r->connection->pool, &cache->vb, 0);
3099 apr_table_setn(r->connection->notes, pw_cache_note_name, (void *)cache);
3101 cache->pwlen = strlen(passwd);
3103 ap_varbuf_grow(&cache->vb, cache->pwlen + hashlen + 1);
3104 memcpy(cache->vb.buf, passwd, cache->pwlen);
3105 memcpy(cache->vb.buf + cache->pwlen, hash, hashlen + 1);
3106 cache->result = apr_password_validate(passwd, hash);
3107 return cache->result;