{"id":13793341,"url":"https://github.com/rover95/morse-encrypt","last_synced_at":"2025-05-12T20:30:57.090Z","repository":{"id":43088428,"uuid":"155204842","full_name":"rover95/morse-encrypt","owner":"rover95","description":"基于零宽字符和摩斯电码的隐藏文本加密 || Text hiding encryption、Morse code encryption、zero-width character encryption","archived":false,"fork":false,"pushed_at":"2022-12-09T16:20:06.000Z","size":3166,"stargazers_count":521,"open_issues_count":19,"forks_count":68,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-22T14:19:43.166Z","etag":null,"topics":["text-encryption","zero-width-character"],"latest_commit_sha":null,"homepage":"http://zero.rovelast.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rover95.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-29T12:03:38.000Z","updated_at":"2025-04-14T20:52:22.000Z","dependencies_parsed_at":"2023-01-25T22:31:39.995Z","dependency_job_id":null,"html_url":"https://github.com/rover95/morse-encrypt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rover95%2Fmorse-encrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rover95%2Fmorse-encrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rover95%2Fmorse-encrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rover95%2Fmorse-encrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rover95","download_url":"https://codeload.github.com/rover95/morse-encrypt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253816675,"owners_count":21968865,"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":["text-encryption","zero-width-character"],"created_at":"2024-08-03T23:00:19.100Z","updated_at":"2025-05-12T20:30:56.288Z","avatar_url":"https://github.com/rover95.png","language":"JavaScript","funding_links":[],"categories":["Code"],"sub_categories":["blog/website"],"readme":"# 隐藏字符加密\n\n原理是利用零宽字符对加密文本进行转码，嵌入到普通文本当中，从而隐藏加密内容；表面看起来是一段普通文本，复制粘贴不会丢失  \n\n[原理介绍(知乎)](https://zhuanlan.zhihu.com/p/75992161)  \n\n## **更新**\n- 添加unicode转码, 支持所有字符\n- npm包使用\n```\nnpm i zero-encrypt -S\n```\n\n```js\nvar encrypt = require('zero-encrypt')\n/*\n    基于摩斯电码加密\n    @param {String} str 待加密文本\n    @param {String} textBefore 前段明文\n    @param {String} textAfter 后段明文\n*/\nencrypt.incode(str,textBefore, textAfter)\n\n/*\n    基于摩斯电码解密\n    @param {String} text 待解密字符串\n*/\nencrypt.decode(text)\n\n/*\n    unicode加密\n    @param {String} str 待加密文本\n    @param {String} textBefore 前段明文\n    @param {String} textAfter 后段明文\n*/\nincodeByUnicode (str, textBefore, textAfter)\n\n/*\n  unicode解密\n  @param {String} str 待解密字符串\n*/\ndecodeByUnicode (str)\n```\n\n## 存储隐藏信息  \n\n比如隐藏加密存储比特币钱包，或者在你的代码里埋下一个彩蛋  \n![gif](https://raw.githubusercontent.com/rover95/morse-encrypt/master/src/assets/morse-b.gif)\n\n## 秘密传达消息\n\n零宽字符在大部分应用都支持，pc版QQ会显示零宽字符，但移动端不显示 [issue#7](https://github.com/rover95/morse-encrypt/issues/7)  \n\n你可以将密文加密到普通文本中，然后邮件发送，表面上看起来是普通文本，只有对方复制明文进行解密后才能看出隐藏信息\n\n## 为文章添加隐藏水印\n\n你可以在你写的文章插入隐藏字符，将作者信息嵌入其中，当别人复制你的文章时，并不会发现这片文章已经被你悄悄打下水印\n比如下面这段话，复制粘贴到 [http://zero.rovelast.com](http://zero.rovelast.com) 进行解密\n\n```txt\n春风再美也比上你的笑，‌‍‌​‍‍‍​‌‌‌‍​‌​‌‍‌‌​‌‍​‌‌‌​‍没见过你的人不会明了\n```\n\n## 自定义\n~~~密码字典使用了摩斯电码，所以只支持小写；目前支持字符集包括小写字母、数字、中文~~~\n在morse码基础上添加unicode转码支持全部字符    \n通过编辑`/src/utils/morse.js`文件，可在摩斯电码的基础上自定义自己独一无二的密码字典  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frover95%2Fmorse-encrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frover95%2Fmorse-encrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frover95%2Fmorse-encrypt/lists"}