Code Monkey home page Code Monkey logo

gorsa's People

Contributors

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

gorsa's Issues

the decrypt data is not the raw data

I use the demo encrypt the data below, the data is json format
var data string = {"code":0,"data":{"hostInfo":{"hostname":"bogon","uptime":97219,"bootTime":1576979419,"procs":322,"os":"darwin","platform":"darwin","platformFamily":"Standalone Workstation","platformVersion":"10.14","kernelVersion":"18.0.0","kernelArch":"x86_64","virtualizationSystem":"","virtualizationRole":"","hostid":"df83ad37-501e-3b4f-b1f0-04f3ac90fe35","agentId":"2aa8f09b-75b2-4a66-9cea-31d7be2ca0db","ips":["192.168.6.214"],"modelName":"Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz","cores":2,"threads":4,"GHz":3.1,"memory":8589934592}},"msg":"success"}

but when decrypt, the data is wrong, it not the raw data.

pubKeyByte方法修改

感谢大神的分享,我在使用过程中,总是出现问题。检查了好久,直接把如下代码调整了下。可以正常使用。out 默认初始化长度为0。由于对整个加密解密原理不清楚,所以不知道是不是个案。
pubKeyByte 即公钥加密或解密byte方法中的以下代码,
iv := make([]byte, k)
out := bytes.NewBuffer(iv)
我修改为
iv := make([]byte, 0)
out := bytes.NewBuffer(iv)

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.