Blog加密
What’s this
First of all, the BEST post encryption plugin in the universe for hexo.(But what about the other plugins?)- It is for those who write a post, but don’t want everyone to read it. Thus, password is required in certain pages to access these encrypted posts.
- Encryption is simple on wordpress, emlog or other blog systems, except hexo. :(
- So it’s “hexo-blog-encrypt”‘s time.
Features
- Once you enter the correct password, you can get the access to encrypted posts, and the password is remembered locally. Press the button again, and the stored password will be erased. If there’re scripts in the post, they will be executed once the post is decrypted.
- Support preset tag-specified password.
- All functions are provided by the native APIs. We use Crypto in Node.js, and use Web Crypto API in Browsers.
- PBKDF2, SHA256 is used to derive keys, We use AES256-CBC to encrypt and decrypt data, we also use HMAC to verify message authentication codes to make sure the posts are decrypted well and not modified.
- Promise is widely used to make sure our main procedures are asynchronous, so that there is little chance for the process to be blocked, and the experience will be more fluent.
- Template theme supported, you can use [
default,blink,flip,shrink,surge,up,wave,xray] to set up your template theme, and CHECK ONLINE. - Outdated browsers may not work well. In such case, please upgrade your browser.
Online demo
- See Demo Page, all passwords are hello.
Install
npm install --save hexo-blog-encrypt- or
yarn add hexo-blog-encrypt(require Yarn)
Quick start
- Add the “password” value to your post’s front matter like:
1 | --- |
- Then use
hexo clean && hexo g && hexo sto see your encrypted post locally.
Password Priority
post’s front matter > encrypt tags
Advanced settings
in post’s front matter
1 | --- |
In _config.yml
Example
1 | # Security |
To disable tag encryption
Just set the password property in front matter to "".
Example:
1 | --- |
Config priority
post’s front matter > _config.yml (in the root directory) > default
来自:开源项目GitHub - D0n9X1n/hexo-blog-encrypt: Yet, just another hexo plugin for security.
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.


