Skip to content

Nelli-Venkatesh/RSA_CLIENT_SIDE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RSA_CLIENT_SIDE

Encryption of data using RSA Encryption with different key sizes and uses token based Authentication and JWT style signature verification.

Example

  scope.rsa_get = function () {
            var req = {
                ID: "1",
                NAME: "Hello This is Venkatesh Nelli"
            };
            ns.end_encrypt_get(baseurl + "get_Test", req, scope.CLIENT_PUBLIC_KEY, scope.CLIENT_PRIVATE_KEY, function (status, data) {
                console.log(status);
                console.log(data);
            }, function (status, data) {
            }, true);
        };

Usage

First Generate a public and key private key using the server side library and store it in the session and for token athentication generate token and save it in the session.

In the above method 1st parameter of end_encrypt_get is the URL and second parameter is data which should be in JSON and third and fourth parameters are public and private keys for RSA encryption and 5th and 6th parameters are success and failure callback functions and last one is boolean value when it should be true when server side sending data is encrypted and false when sending normal data from server.

In the callback functions staus is the http statuscode and data is the response data.

You can find server side encryption and decryption in another github repository SERVER SIDE RSA WITH EXAMPLE SOLUTION

Support or Contact

For any issues in the code please raise an issue or mail me for any other information.

About

Encryption of data using RSA Encryption with different key sizes and uses token based Authentication and JWT style signature verification

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages