GithubHelp home page GithubHelp logo

rsademo's Introduction

注意

1、 demo中所有的加解密都支持分段处理。

2、 注意一下填充模式

3、 私钥加密公钥解密只是为了演示可行性,要根据场景做调整使用

4、 已增加单元测试,有需要的话可以多测试几次。

5、格式化私钥到 pem 格式的时候,注意开头和结尾要用如下格式(PKCS#1)

-----BEGIN RSA PRIVATE KEY-----

-----END RSA PRIVATE KEY-----

下面这种格式为 (PKCS#8)

-----BEGIN PRIVATE KEY-----
BASE64 ENCODED DATA
-----END PRIVATE KEY-----

PKCS#1结构仅为RSA设计。X509,SSL支持的算法不仅仅是RSA,因此产生了更具有通用性的PKCS#8

https://tls.mbed.org/kb/cryptography/asn1-key-structures-in-der-and-pem

https://medium.com/@oyrxx/rsa秘钥介绍及openssl生成命令-d3fcc689513f

rsademo's People

Contributors

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