П О Р Т А Л                            
С Е Т Е В Ы Х                          
П Р О Е К Т О В                        
  
Поиск по сайту:
                                                 
Главная

О проекте

Web-мастеру
     HTML & JavaScript
     SSI
     Perl
     PHP
     XML & XSLT
     Unix Shell

MySQL

Безопасность

Хостинг

Другое








Самое читаемое:

Учебник PHP - "Для Чайника".
Просмотров 5481 раз(а).

Иллюстрированный самоучитель по созданию сайтов.
Просмотров 7816 раз(а).

Учебник HTML.
Просмотров 4576 раз(а).

Руководство по PHP5.
Просмотров 1131 раз(а).

Хостинг через призму DNS.
Просмотров 6376 раз(а).

Подборка текстов стандартных документов.
Просмотров 57191 раз(а).

Учебник PHP - Самоучитель
Просмотров 4787 раз(а).

Документация на MySQL (учебник & справочное руководство)
Просмотров 10817 раз(а).

Внешние атаки...
Просмотров 6405 раз(а).

Учебник PHP.
Просмотров 3915 раз(а).

SSI в примерах.
Просмотров 931 раз(а).



 
 
| Добавить в избранное | Сделать стартовой | Помощь





Руководство по PHP
Пред. След.

mhash_keygen_s2k

(PHP 4 >= 4.0.4, PHP 5)

mhash_keygen_s2k -- Generates a key

Description

string mhash_keygen_s2k ( int hash, string password, string salt, int bytes )

mhash_keygen_s2k() generates a key that is bytes long, from a user given password. This is the Salted S2K algorithm as specified in the OpenPGP document (RFC 2440). That algorithm will use the specified hash algorithm to create the key. The salt must be different and random enough for every key you generate in order to create different keys. That salt must be known when you check the keys, thus it is a good idea to append the key to it. Salt has a fixed length of 8 bytes and will be padded with zeros if you supply less bytes.

Keep in mind that user supplied passwords are not really suitable to be used as keys in cryptographic algorithms, since users normally choose keys they can write on keyboard. These passwords use only 6 to 7 bits per character (or less). It is highly recommended to use some kind of transformation (like this function) to the user supplied key.



Если Вы не нашли что искали, то рекомендую воспользоваться поиском по сайту:
 





Copyright © 2005-2016 Project.Net.Ru