Coder Social home page Coder Social logo

sm4_client_server's Introduction

最近做一个项目,规定的是用国密SM4来加密,以前从来没用过这个方法,百度了好多的文章,大多说的都是如何使用Java来实现SM4算法的,javascript的实现少之又少。

然后我找到了 gm-crypt这个插件,前端实现起来十分方便,但是我一运行我们后端给的代码,我人傻了,前端、后端加解密出来的结果不一样。

然后我就找到了这篇文章:

SM4算法的ECB模式在java和js中的一些区别

大概看懂了是怎么回事儿,觉得很有道理,但是一想,淦,我怎么自己改Java的算法啊,我是一个前端啊,于是我呼叫了场外援助,有请后端大佬帮忙,在网上总算是找到了一个和前端加解密结果一样的Java代码了。

Java实现国密算法SM2,SM3,SM

所以,来记录分享一下这个问题,面向CSDN编程的程序员真的太难了唉。

sm4_client_server's People

Contributors

comradewong avatar

Stargazers

 avatar

Watchers

 avatar  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.