Krok po koroku, pełna dokumentacja w języku polskim. Skrypty napisane w PHP są z reguły umieszczane w dokumentach tekstowych (często razem z HTML lub XHTML). Dzięki temu PHP jest podobny w założeniach do dużo starszego mechanizmu Server Side Includes[4]. PHP pozwala także na wykonywanie skryptów z linii poleceń podobnie jak Perl i Python. Jego modułowa budowa udostępnia również możliwość programowania aplikacji z interfejsem graficznym. PHP umożliwia współpracę z wieloma rodzajami źródeł danych, jak na przykład serwery relacyjnych baz danych, pliki tekstowe czy dokumenty XML.
mcrypt_encrypt() encrypts the data and returns the encrypted data.
Cipher is one of the MCRYPT_ciphername
constants of the name of the algorithm as string.
Key is the key with which the data
will be encrypted. If it's smaller that the required keysize, it
is padded with '\0'. It is better not to use ASCII strings for
keys. It is recommended to use the mhash functions to create a key
from a string.
Data is the data that will be encrypted
with the given cipher and mode. If the size of the data is not
n * blocksize, the data will be padded with '\0'. The returned
crypttext can be larger that the size of the data that is given
by data.
Mode is one of the MCRYPT_MODE_modename
constants of one of "ecb", "cbc", "cfb", "ofb", "nofb" or
"stream".
The IV parameter is used for the
initialisation in CBC, CFB, OFB modes, and in some algorithms
in STREAM mode. If you do not supply an IV, while it is needed
for an algorithm, the function issues a warning and uses an
IV with all bytes set to '\0'.
See also mcrypt_module_open() for a more advanced API and an example.
| Poprzedni | Spis treści | Następny |
| mcrypt_enc_self_test | Początek rozdziału | mcrypt_generic_deinit |
php
kontakt:praca.pozycjonowanie@gmail.com