Versions in this module Expand all Collapse all v1 v1.1.0 Aug 22, 2024 Changes in this version + var ErrNoSecretKeyMatch = errors.New("no skey matched") + type CryptoMethod uint32 + const AllSupportedCrypto + const CryptoMethodPlaintext + const CryptoMethodRC4 + func DefaultCryptoSelector(provided CryptoMethod) CryptoMethod + func InitiateHandshake(rw io.ReadWriter, skey, initialPayload []byte, cryptoProvides CryptoMethod) (ret io.ReadWriter, method CryptoMethod, err error) + func InitiateHandshakeContext(ctx context.Context, rw io.ReadWriter, skey, initialPayload []byte, ...) (ret io.ReadWriter, method CryptoMethod, err error) + func ReceiveHandshake(ctx context.Context, rw io.ReadWriter, skeys SecretKeyIter, ...) (io.ReadWriter, CryptoMethod, error) + type CryptoSelector func(CryptoMethod) CryptoMethod + type HandshakeResult struct + SecretKey []byte + func ReceiveHandshakeEx(ctx context.Context, rw io.ReadWriter, skeys SecretKeyIter, ...) (ret HandshakeResult) + type SecretKeyIter func(callback func(skey []byte) (more bool))