PHP Manual

PHP function stream_socket_enable_crypto()

2019-09-11T08:04:03.000Z

Obsah článku

Availability in versions: PHP 5.1.0

Turns encryption on/off on an already connected socket

Parameters

Parameter Data type Default value Note
$stream resource not The stream resource.
$enable bool not Enable/disable cryptography on the stream.
$crypto_type int null, Setup encryption on the stream. Valid methods are STREAM_CRYPTO_METHOD_SSLv2_CLIENT @param resource $session_stream [optional]

Seed the stream with settings from session_stream.

$session_stream resource null Seed the stream with settings from session_stream.

Return values

mixed

true on success, false if negotiation has failed or
0 if there isn't enough data and you should try again
(only for non-blocking sockets).

Other resources

Official stream-socket-enable-crypto documentation

Jan Barášek   Více o autorovi

Autor článku pracuje jako seniorní vývojář a software architekt v Praze. Navrhuje a spravuje velké webové aplikace, které znáte a používáte. Od roku 2009 nabral bohaté zkušenosti, které tímto webem předává dál.

Rád vám pomůžu:

Související články

1.
236.

V jiných jazycích

Status:
All systems normal.
2025