GithubHelp home page GithubHelp logo

rsa-encrypt-body-spring-boot's People

Contributors

dependabot[bot] avatar imyzt avatar ishuibo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rsa-encrypt-body-spring-boot's Issues

两个Adivice类的线程安全问题

EncryptResponseBodyAdvice和EncryptRequestBodyAdvice中的supports方法中,将枚举和是否加密存入类变量中是不对的,线程不安全。

javax.crypto.IllegalBlockSizeException

RSAUtil 类中的 MAX_DECRYPT_BLOCK 为 256 时,使用 1024 位的密钥进行分段解密会抛出 “Data must not be longer than 128 bytes“ 异常,将 MAX_DECRYPT_BLOCK 值设置为 128 时正常工作。

关于前端解密的问题

现在我们有一个需求,那就是前端加密,后端解密。后端返回值也加密,前端解密。
我的想法是 有两对,
A 私钥给前端用,公钥给后端用。用于前端加密,后端解密。
B 私钥给前端用,公钥给后端用,用户后端加密,前端解密。
前后端相互 都持有一个公钥和一个密钥。
请问还有比这个更好的方式吗?

可以继续优化

可以将加密和解密注解整合到EnableSecurity 注解中一次配置多方使用,防止因为疏忽部分接口未进行加密

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.