{"id":20275371,"url":"https://github.com/theme-particlex/hexo-helper-crypto","last_synced_at":"2025-04-11T05:23:57.144Z","repository":{"id":64534396,"uuid":"575755762","full_name":"theme-particlex/hexo-helper-crypto","owner":"theme-particlex","description":"A Hexo helper for encryption and decryption using Crypto-js.","archived":false,"fork":false,"pushed_at":"2024-08-20T16:21:02.000Z","size":31,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T03:27:27.709Z","etag":null,"topics":["crypto-js","encryption-decryption","helper","hexo","hexo-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theme-particlex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-08T08:20:00.000Z","updated_at":"2024-08-20T16:21:06.000Z","dependencies_parsed_at":"2023-02-18T06:01:07.430Z","dependency_job_id":"52955e31-29fe-401e-8499-1840e79db432","html_url":"https://github.com/theme-particlex/hexo-helper-crypto","commit_stats":null,"previous_names":["argvchs/hexo-helper-crypto"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-particlex%2Fhexo-helper-crypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-particlex%2Fhexo-helper-crypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-particlex%2Fhexo-helper-crypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theme-particlex%2Fhexo-helper-crypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theme-particlex","download_url":"https://codeload.github.com/theme-particlex/hexo-helper-crypto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248346546,"owners_count":21088473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crypto-js","encryption-decryption","helper","hexo","hexo-plugin"],"created_at":"2024-11-14T13:09:09.532Z","updated_at":"2025-04-11T05:23:57.120Z","avatar_url":"https://github.com/theme-particlex.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hexo-Helper-Crypto\r\n\r\n[Hexo-Helper-Crypto](https://github.com/theme-particlex/hexo-helper-crypto) 插件，用于在模板文件内加/解密数据，使用 [CryptoJS](https://github.com/brix/crypto-js)。\r\n\r\n# 1. 安装\r\n\r\n```bash\r\npnpm add hexo-helper-crypto\r\n```\r\n\r\n# 2. 使用\r\n\r\n在模板文件（以下使用 EJS 模板引擎）中，添加：\r\n\r\n```ejs\r\n\u003c% const CryptoJS = getCryptoJS(); %\u003e\r\n```\r\n\r\n然后可以直接使用 `CryptoJS`，和 [CryptoJS](https://github.com/brix/crypto-js) 接口一样。\r\n\r\n以下例子获取了页面标题的 SHA256 值，并用 Base64 编码。\r\n\r\n```ejs\r\n\u003c% const CryptoJS = getCryptoJS(); %\u003e\r\n\u003c%= CryptoJS.SHA256(page.title).toString(CryptoJS.enc.Base64) %\u003e\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheme-particlex%2Fhexo-helper-crypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheme-particlex%2Fhexo-helper-crypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheme-particlex%2Fhexo-helper-crypto/lists"}