You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
432 B
27 lines
432 B
3 years ago
|
package exchange
|
||
|
|
||
|
import (
|
||
|
"io"
|
||
|
|
||
|
"go.uber.org/zap"
|
||
|
|
||
|
"github.com/gotd/td/internal/crypto"
|
||
|
)
|
||
|
|
||
|
// ClientExchange is a client-side key exchange flow.
|
||
|
type ClientExchange struct {
|
||
|
unencryptedWriter
|
||
|
rand io.Reader
|
||
|
log *zap.Logger
|
||
|
|
||
|
keys []PublicKey
|
||
|
dc int
|
||
|
}
|
||
|
|
||
|
// ClientExchangeResult contains client part of key exchange result.
|
||
|
type ClientExchangeResult struct {
|
||
|
AuthKey crypto.AuthKey
|
||
|
SessionID int64
|
||
|
ServerSalt int64
|
||
|
}
|