SecureSpace 1.0.2

I'm Very Lazy To Write Description

Install-Package SecureSpace -Version 1.0.2
dotnet add package SecureSpace --version 1.0.2
<PackageReference Include="SecureSpace" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SecureSpace --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

.NET RSA AES SERVER SIDE LIBRARY FOR SECURE DATA TRANSMISSION

This library used to send and recieve data in secure way from server to client side and client side to server.
For client side i have used angular JS services with Google Crypto JS and JsClasses for RSA. 
Using this library data can be transmitted both sides encrypted and in secure way.In the middle you can't access the data.

Nuget Library :

You can download nuget pakcage from here Nuget Library.
You can find client side encryption and decryption in another github repository CLIENT SIDE RSA WITH EXAMPLE SOLUTION

Usage

Create a web api solution in the visual studio and in the Global.asax and in the Application_Start() initialize the library using CORE_MODULE.Initialize(4096); line the number 4096 is the RSA encryption key length you can use different key lengths 4096,2048,1024,512.
To Decrypt the data sent from the client in the controller just use the string decoded_data = MAIN_MODULE.DECODE_DATA(data); and in the string you'll get JSON data in the string.
To Encrypt the data before sending it to client side use string encrypted_data = MAIN_MODULE.ENCODE_DATA(decoded_data);

Example

FOR TOKEN GENERATION :
    [HttpGet]
    [Route("get_token")]
    public IHttpActionResult get_token()
    {
      TOKEN_MODULE.addResponse("Success", "200");  //you can add many parameters with the access_token 
      return Ok(TOKEN_MODULE.generate_token());
    }
FOR PUBLIC AND PRIVATE KEY GENERATION :
    [HttpGet]
    [Route("server_and_client_rsa_api")]
    public IHttpActionResult server_and_client_rsa_api()
    {
      return Ok(SECURE_MODULE.SERVER_CLIENT_RSA_PAIR());
    }
Without Token Authentication
  [HttpGet]
  [Route("get_Test")]
  public IHttpActionResult get_Test(string data)
  {
    string decoded_data = SECURE_MODULE.DECODE_DATA(data);
    string encrypted_data = SECURE_MODULE.ENCODE_DATA(decoded_data);
    return Ok(decoded_data);
  }

  [HttpPost]
  [Route("post_Test")]
  public IHttpActionResult post_Test(dynamic data)
  {
    string decoded_data = SECURE_MODULE.DECODE_DATA(data);
    string encrypted_data = SECURE_MODULE.ENCODE_DATA(decoded_data);
    return Ok(decoded_data);
  }
    
With Token Authentication
  [HttpGet]
  [Route("get_Test")]
  public IHttpActionResult get_Test(string data)
  {    
    TOKEN_MODULE.addClaim("admin");
    string decoded_data = TOKEN_MODULE.DECODE_DATA(data);
    string encrypted_data = SECURE_MODULE.ENCODE_DATA(decoded_data);
    return Ok(decoded_data);
  }

  [HttpPost]
  [Route("post_Test")]
  public IHttpActionResult post_Test(dynamic data)
  {
    string decoded_data = TOKEN_MODULE.DECODE_DATA(data);
    string encrypted_data = SECURE_MODULE.ENCODE_DATA(decoded_data);
    return Ok(decoded_data);
  }
    

Support or Contact

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

.NET RSA AES SERVER SIDE LIBRARY FOR SECURE DATA TRANSMISSION

This library used to send and recieve data in secure way from server to client side and client side to server.
For client side i have used angular JS services with Google Crypto JS and JsClasses for RSA. 
Using this library data can be transmitted both sides encrypted and in secure way.In the middle you can't access the data.

Nuget Library :

You can download nuget pakcage from here Nuget Library.
You can find client side encryption and decryption in another github repository CLIENT SIDE RSA WITH EXAMPLE SOLUTION

Usage

Create a web api solution in the visual studio and in the Global.asax and in the Application_Start() initialize the library using CORE_MODULE.Initialize(4096); line the number 4096 is the RSA encryption key length you can use different key lengths 4096,2048,1024,512.
To Decrypt the data sent from the client in the controller just use the string decoded_data = MAIN_MODULE.DECODE_DATA(data); and in the string you'll get JSON data in the string.
To Encrypt the data before sending it to client side use string encrypted_data = MAIN_MODULE.ENCODE_DATA(decoded_data);

Example

FOR TOKEN GENERATION :
    [HttpGet]
    [Route("get_token")]
    public IHttpActionResult get_token()
    {
      TOKEN_MODULE.addResponse("Success", "200");  //you can add many parameters with the access_token 
      return Ok(TOKEN_MODULE.generate_token());
    }
FOR PUBLIC AND PRIVATE KEY GENERATION :
    [HttpGet]
    [Route("server_and_client_rsa_api")]
    public IHttpActionResult server_and_client_rsa_api()
    {
      return Ok(SECURE_MODULE.SERVER_CLIENT_RSA_PAIR());
    }
Without Token Authentication
  [HttpGet]
  [Route("get_Test")]
  public IHttpActionResult get_Test(string data)
  {
    string decoded_data = SECURE_MODULE.DECODE_DATA(data);
    string encrypted_data = SECURE_MODULE.ENCODE_DATA(decoded_data);
    return Ok(decoded_data);
  }

  [HttpPost]
  [Route("post_Test")]
  public IHttpActionResult post_Test(dynamic data)
  {
    string decoded_data = SECURE_MODULE.DECODE_DATA(data);
    string encrypted_data = SECURE_MODULE.ENCODE_DATA(decoded_data);
    return Ok(decoded_data);
  }
    
With Token Authentication
  [HttpGet]
  [Route("get_Test")]
  public IHttpActionResult get_Test(string data)
  {    
    TOKEN_MODULE.addClaim("admin");
    string decoded_data = TOKEN_MODULE.DECODE_DATA(data);
    string encrypted_data = SECURE_MODULE.ENCODE_DATA(decoded_data);
    return Ok(decoded_data);
  }

  [HttpPost]
  [Route("post_Test")]
  public IHttpActionResult post_Test(dynamic data)
  {
    string decoded_data = TOKEN_MODULE.DECODE_DATA(data);
    string encrypted_data = SECURE_MODULE.ENCODE_DATA(decoded_data);
    return Ok(decoded_data);
  }
    

Support or Contact

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

Release Notes

This is First release of the package.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.2 91 5/18/2019
1.0.1 92 4/16/2019
1.0.0 101 3/11/2019