CakePHP Cookbook 2.x
(or “salt”) for use in security hashes. The second is defining a custom number (or “seed”) for use in encryption. The security salt is used for generating hashes. Change the default Security.salt value make it: /** * A random string used in security hashing methods. */ Configure::write('Security.salt', 'pl345e-P45s_7h3*S@l7!'); The cipher seed is used for encrypt/decrypt strings. Change the default 256 bit/32 byte key to use as a cipher key. $hmacSalt (string) – The salt to use for the HMAC process. Leave null to use Security.salt. Encrypt $text using AES-256. The $key should be a value with a lots0 码力 | 1096 页 | 958.62 KB | 1 年前3
Django 3.0.x Documentationdefault. The password attribute of a User object is a string in this format:$ $<salt>$ Those are the components used for storing a User’s password, separated by the dollar-sign and consist of: the hashing algorithm, the number of algorithm iterations (work factor), the random salt, and the resulting password hash. The algorithm is one of a number of one-way hashing or password Django can use; see below. Iterations describe the number of times the algorithm is run over the hash. Salt is the random seed used and the hash is the result of the one- way function. By default, Django uses 0 码力 | 3085 页 | 2.95 MB | 1 年前3
peewee Documentation Release 2.10.2db') def get_hexdigest(salt, raw_password): data = salt + raw_password return sha1(data.encode('utf8')).hexdigest() @db.func() def make_password(raw_password): salt = get_hexdigest(str(random()) get_hexdigest(salt, raw_password) return '%s$%s' % (salt, hsh) @db.func() def check_password(raw_password, enc_password): salt, hsh = enc_password.split('$', 1) return hsh == get_hexdigest(salt, raw_password)0 码力 | 275 页 | 276.96 KB | 1 年前3
CakePHP Cookbook 3.x
Cake\Routing\RouteCollection extensions() Cake\TestSuite\TestFixture schema() Cake\Utility\Security salt() Cake\View\View template() layout() theme() templatePath() layoutPath() autoLayout() (now isAutoLayoutEnabled() they’re not required for this tutorial. One is defining a custom string (or “salt”) for use in security hashes. The security salt is used for generating hashes. If you used Composer this too is taken care you’d need to change the default salt value by editing config/app.php. It doesn’t matter much what the new value is, as long as it’s not guessable: 'Security' => [ 'salt' => 'something long and containing0 码力 | 1244 页 | 1.05 MB | 1 年前3
peewee Documentation Release 3.0.0db') def get_hexdigest(salt, raw_password): data = salt + raw_password return sha1(data.encode('utf8')).hexdigest() @db.func() def make_password(raw_password): salt = get_hexdigest(str(random()) get_hexdigest(salt, raw_password) return '%s$%s' % (salt, hsh) @db.func() def check_password(raw_password, enc_password): salt, hsh = enc_password.split('$', 1) return hsh == get_hexdigest(salt, raw_password)0 码力 | 319 页 | 361.50 KB | 1 年前3
CakePHP Cookbook 4.x
$request- >getParam('paging'). CSRF Middleware Generated tokens now contain an HMAC signed with Security.salt. This ensures the tokens were generated by the same application that receives them. CSRF tokens generated they’re not required for this tutorial. One is defining a custom string (or “salt”) for use in security hashes. The security salt is used for generating hashes. If you used Composer this too is taken care you’d need to change the default salt value by editing config/app.php. It doesn’t matter much what the new value is, as long as it’s not guessable: 'Security' => [ 'salt' => 'something long and containing0 码力 | 1249 页 | 1.04 MB | 1 年前3
peewee Documentation
Release 3.5.0db') def get_hexdigest(salt, raw_password): data = salt + raw_password return sha1(data.encode('utf8')).hexdigest() @db.func() def make_password(raw_password): salt = get_hexdigest(str(random()) get_hexdigest(salt, raw_password) return '%s$%s' % (salt, hsh) @db.func() def check_password(raw_password, enc_password): salt, hsh = enc_password.split('$', 1) return hsh == get_hexdigest(salt, raw_password)0 码力 | 347 页 | 380.80 KB | 1 年前3
peewee Documentation Release 3.4.0db') def get_hexdigest(salt, raw_password): data = salt + raw_password return sha1(data.encode('utf8')).hexdigest() @db.func() def make_password(raw_password): salt = get_hexdigest(str(random()) get_hexdigest(salt, raw_password) return '%s$%s' % (salt, hsh) @db.func() def check_password(raw_password, enc_password): salt, hsh = enc_password.split('$', 1) return hsh == get_hexdigest(salt, raw_password)0 码力 | 349 页 | 382.34 KB | 1 年前3
peewee Documentation Release 3.1.0db') def get_hexdigest(salt, raw_password): data = salt + raw_password return sha1(data.encode('utf8')).hexdigest() @db.func() def make_password(raw_password): salt = get_hexdigest(str(random()) get_hexdigest(salt, raw_password) return '%s$%s' % (salt, hsh) @db.func() def check_password(raw_password, enc_password): salt, hsh = enc_password.split('$', 1) return hsh == get_hexdigest(salt, raw_password)0 码力 | 332 页 | 370.77 KB | 1 年前3
Django 4.2.x Documentationdefault. The password attribute of a User object is a string in this format:$ $<salt>$ Those are the components used for storing a User’s password, separated by the dollar-sign and consist of: the hashing algorithm, the number of algorithm iterations (work factor), the random salt, and the resulting password hash. The algorithm is one of a number of one-way hashing or password Django can use; see below. Iterations describe the number of times the algorithm is run over the hash. Salt is the random seed used and the hash is the result of the one- way function. By default, Django uses 0 码力 | 3305 页 | 3.16 MB | 1 年前3
共 152 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16













