TODO: Implement AsyncWrite/Read for the write/read halves
TODO: Implement set_encrypted_write/read for the write/read halves
Fortune for rsh's current commit: Half blessing − 半吉
// Note: These key+IV pairs are never used, as `state` defaults to unencrypted, and a new key/iv pair is generated when we `set_encrypted_write/read(true)`.
// TODO: Have a method to exchange these default session keys after `exchange()`?
tx: AsyncSink::encrypt(tx,tk,tiv).expect("Failed to create temp AsyncSink"),
rx: AsyncSource::encrypt(rx,tk,tiv).expect("Failed to create temp AsyncSource"),
}
}
/// Create a new `ESock` wrapper over this writer and reader with a newly generated private key
/// You must preform an `exchange()` before splitting, as exchanging RSA keys is not possible on a single half.
///
/// It is also more efficient to `set_encrypted_write/read(true)` on `ESock` than it is on the halves, but changinc encryption modes on halves is still possible.