SecureSpace 1.0.2

dotnet add package SecureSpace --version 1.0.2                
NuGet\Install-Package SecureSpace -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<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                
#r "nuget: SecureSpace, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SecureSpace as a Cake Addin
#addin nuget:?package=SecureSpace&version=1.0.2

// Install SecureSpace as a Cake Tool
#tool nuget:?package=SecureSpace&version=1.0.2                

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

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 673 5/18/2019
1.0.1 531 4/16/2019
1.0.0 566 3/11/2019

This is First release of the package.