Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Commit

Permalink
version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rsantosbliss committed Jan 14, 2021
1 parent ae67f82 commit 740f3e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

Utilities arround [Apple CryptoKit](https://developer.apple.com/documentation/cryptokit)

## Usage
## Sample Usage

```swift

Expand Down Expand Up @@ -53,8 +53,17 @@ let decryptedData = CryptoKit.decrypt(encryptedData: encryptedData, using

```

## Sample working rojects

Inside the folders __RJSecuritySampleClient__ and __RJSecuritySampleServer__ can be found sample app (Swift) and WebServer (Vapor) ready to use. Booth the app and server have RJSP_Security lib installed via SPM and work as a live example.

_RJSecuritySampleClient
Open both projects on Xcode, start the server, and then start the app.

_RJSecuritySampleServer
![alt text](_Documents/image1.png)

The flow is as follows:

* The app (client) send is public key to the server (on the request body) and his user id (on the request header)
* The server store the user id and the user public key and returns his public key
* The app (client) receives the server public key, and then do a secure/encripted request to the server
* The server receives the encripted request, decript it using the client public key and his (server) private key and returns the decripted message
Binary file added _Documents/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 740f3e7

Please sign in to comment.