Month: October 2019
Nginx fastcgi_cache And proxy_cache
FastCGI Cache Example FastCGI Cache VS WP Super Cache FastCGI cache is faster than WP Super Cache because the latter uses .htaccess and PHP itself to route the visitor to the cache (files). So before the visitors get to a hit on a cached page, WP Super Cache has to perform some logic both in…
PHP 模拟 RSA 算法
从 1-10 中间任意取两个 质素 p 和 q 让 p*q = n funN = (p-1) * (q-1) 获取 公钥 e: – 1 < e < funN– e 和 funN 互质 获取 私钥 d:使得 (e * d) % funN = 1 任意拿一个数字 m 用公钥匙 e 对其加密:pow(m, e) % n = c,c 即加密后的信息 用私钥 d 对c 解密:pow(c, d)…