Skip to content

Commit

Permalink
doc: Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Mar 12, 2021
1 parent 873a9c8 commit f072f6b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Expand Up @@ -36,7 +36,8 @@ import {
encrypt,
decrypt,
applyKeyToURL,
getKeyFromURL
getKeyFromURL,
generateKey
} from '@47ng/simple-e2ee'

// Before sending data to the server, encrypt it:
Expand All @@ -61,6 +62,12 @@ const message = decrypt(payload, key)
const key = getKeyFromURL(
`https://example.com/share/foo#KatLceVEOM2znzX_FGPKu6Zz1adWkhlq9b2R9WRjUsM=`
)

// Encrypt related pieces of content with the same key:
const payload = encrypt('some more data', key)

// Generate a key for later use:
const key = generateKey()
```

## License
Expand Down

0 comments on commit f072f6b

Please sign in to comment.