Asf_Util::cpass

Create a 32-bit encrypted password


Description

public static array Asf_Util::cpass(string $data [, string $salt = ''])

Parameters

data

Input a string

Return Values

Returns the encrypted password, And creating a password require salt.

Examples

Example #1

<?php
var_dump(Asf_Util::cpass(123456));

The above example will output:

array(2) {
  [0]=>
  string(32) "9c7844aa4b6daf2649390d0fa7794439"
  [1]=>
  string(6) "32d08c"
}

Example #2

In most cases. Used to detect the value of the specified salt generation.

<?php
var_dump(Asf_Util::cpass(123456, '32d08c'));

The above example will output:

array(2) {
  [0]=>
  string(32) "9c7844aa4b6daf2649390d0fa7794439"
  [1]=>
  string(6) "32d08c"
}