SHA256 w/ Custom Salt
#5
(08-27-2016, 02:22 PM)kiara Wrote: http://book.cakephp.org/3.0/en/core-libr...y::decrypt

Thanks - that is the page I have been referencing without success.  I cannot figure out if the salt is truly keyed with the cipher in first place.   My config file has:

Code:
/**
 * A random string used in security hashing methods.
 */
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs1guVoUubWwvniR2G0FgaC9mi-aoyioueryiqyeryuwry-allup');

/**
 * A random numeric string (digits only) used to encrypt/decrypt strings.
 */
Configure::write('Security.cipherSeed', '76859309657453542496649683645279872958772846');


I have also attempted to write a function to decypher the salt...being the Security::decrypt method is supposed to decrypt strings that have been encrypted with the key:


Code:
$mysalt = Configure::read('Security.salt');                
$myseed = Configure::read('Security.cipherSeed');

echo "mysalt = " . $mysalt . "\n";
echo "myseed = " . $myseed . "\n";

$nosecret = Security::decrypt($mysalt, $myseed);
echo "nosecret = " . $nosecret . "\n";

...but nothing is returned.  Thus, I have not yet figured out if the salt has been encrypted with the key.


Messages In This Thread
SHA256 w/ Custom Salt - by msf004 - 08-26-2016, 09:04 PM
RE: SHA256 w/ Custom Salt - by kiara - 08-26-2016, 10:46 PM
RE: SHA256 w/ Custom Salt - by msf004 - 08-27-2016, 05:57 AM
RE: SHA256 w/ Custom Salt - by kiara - 08-27-2016, 02:22 PM
RE: SHA256 w/ Custom Salt - by msf004 - 08-27-2016, 02:59 PM
RE: SHA256 w/ Custom Salt - by atom - 08-27-2016, 11:03 PM
RE: SHA256 w/ Custom Salt - by msf004 - 08-27-2016, 11:28 PM
RE: SHA256 w/ Custom Salt - by msf004 - 08-28-2016, 02:19 AM
RE: SHA256 w/ Custom Salt - by kiara - 08-28-2016, 12:58 PM
RE: SHA256 w/ Custom Salt - by atom - 08-28-2016, 10:56 AM