Code Monkey home page Code Monkey logo

jencryption's Introduction

Jencryption

一个图片加密算法

特点:

加密前后均为图片格式且加密后图片的尺寸与加密前保持一致。

加密Demo:

加密前: befo 加密后: after

有啥用?

1、反扒

2、盗链 (将自己的私有图片加密后放到公开的cdn上,不怕对方知道图片内容)

3、防盗链(图片都加密了,别人盗过去也不知道杂用)

4、用于在公开论坛传输一些不符合社会主义核心价值观的图片

使用方法:

1、使用二进制文件加解密

加密当前文件夹内全部图片 Jencryption encrypt [密码]

加密指定文件夹/图片 Jencryption encrypt [路径] [密码]

解密当前文件夹 Jencryption decrypt [密码]

解密指定文件夹/图片 Jencryption decrypt [路径] [密码]

2、使用js sdk在你的网站接入

<script src="/js/md5.min.js"></script>
<script src="/js/core.js"></script>
<script>
DecryptAllImage("你的密码")  // 解密页面上全部图片

// DecryptImage(document.getElementById("img"),"你的密码")  // 解密单张图片


</script>

3、在线工具 https://xjiangwei.cn/Jencryption/

有谁用?

Jinnrry Blog 全站文章图片均加密

目前缺陷

1、加密性能不够好,加解密过程有大量hash运算。另外加密后图片体积会变大很多

2、加密后的图片太丑了

3、加密后的图片不能被压缩,一旦图片出现了任何像素点变化就凉凉了

4、目前js sdk只能处理img标签中的图片,css中的图片不能处理

jencryption's People

Contributors

jinnrry avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.