Giter Club home page Giter Club logo

rsa's Introduction

Installation

Laravel 5.0.0 or later is required.

To get the latest version of Laravel Markdown, simply require the project using Composer:

$ composer require tinyada/rsa

Or you can add following to require key in compser.json.

"tinyada/rsa": "~1.0"

then run

$ composer update

Next, You should need to register the service provider. Open up config/app.php and add following into the providers key.

TinyAda\RSA\RSAServiceProvider::class,

And you can register the RSA Facade in the aliases of config/app.php if you want.

'RSA' =>  TinyAda\RSA\RSA::class,

Configuration

To get started, you need to publish all vendor assets using following command.

$ php artisan vendor:publish --provider="TinyAda\RSA\RSAServiceProvider"

This will create a config file named config/rsa.php which you can configure RSA as you like.

Usage

首先,你要使用RSATool2生成rsa秘钥对

Then configure the in your .env file because you'd better not make them public.

Add following to .env.

RSA_PRIVATE_EXP=2C3FDBF70E3F8959BE79DFBE1EF93C8891AE79EBD665C965D545CC3B30D0F04716607ADFD5550FB9D03E050BF46149DD4BB492F863F6C9A0857594E5368E7B93FE5DAD6394997773B548ED357252430BE8724B02007A64E0EEF3F78EF2618FECE452454B4511C1938C6E11B5D0438ADEDC19B4689BDF5285FA93F4DA37EDA659
RSA_PUBLIC_EXP=10001
RSA_MODULUS=97D0B8B70B3637D26E884C7185B6C42C0A7E81D03D90032860014E8547EA5B81E5FEAD35509C2BD5DD5066A1528B687CDF231F21BB36157CB44EF0E4BBC7F4ACAE75AC8BB0B0B9CBF4C678E605D0A227E80A635212967779AD31FE7CF73421A9B1A74E1290794590ABBC905D18490E54019FAE64BA9E1963B318938F6D260CE1

php

#加密
$ciphertext = RSA::encrypt($plaintext);
#解密
RSA::decrypt($ciphertext);

Contribution

If you find something wrong with this package, you can send an email to [email protected]

Or just send a pull request to this repository.

Pull Requests are welcome.

Author

Mradxz , from Beijing China

License

Laravel RSA is licensed under The MIT License (MIT).

rsa's People

Contributors

mradxz avatar

Stargazers

o1688 avatar Sanjay Kumari avatar  avatar Xixi Zhou avatar Luis Mata avatar  avatar Faryne avatar  avatar Gabriel Pedro avatar

Watchers

James Cloos avatar  avatar Luis Mata avatar

rsa's Issues

RSA

How to verify two encrypt value??

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.