18 lines
487 B
Markdown
18 lines
487 B
Markdown
|
|
# Example 01: Basic Conversation
|
||
|
|
|
||
|
|
The simplest possible Shade usage: Alice and Bob exchange encrypted messages using `ShadeSessionManager`. No network, no prekey server — just the core API.
|
||
|
|
|
||
|
|
## Run
|
||
|
|
|
||
|
|
```bash
|
||
|
|
bun run main.ts
|
||
|
|
```
|
||
|
|
|
||
|
|
## What it shows
|
||
|
|
|
||
|
|
- Generating identity keys via `initialize()`
|
||
|
|
- Creating prekey bundles for distribution
|
||
|
|
- Establishing a session with `initSessionFromBundle()`
|
||
|
|
- Encrypting and decrypting messages
|
||
|
|
- Forward secrecy in action: each message uses a new key
|