Page 3 of 3
Posted: Wed Jul 25, 2007 12:58 pm
by superdezign
What's the error? You could easily be using the class incorrectly.
Posted: Wed Jul 25, 2007 1:46 pm
by KalleL
Okay, error is:
Parse error: parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in /path/to/testfolder/Sha256.class.php on line 262
And the small sample code i'm using is:
Code: Select all
<?php
include 'hash_sha256.php';
$sha256 = new Sha256v2();
$hash1 = $sha256->hash(new StringInput('hashi1'));
echo 'hashi1 - '.$hash1;
?>
Posted: Wed Jul 25, 2007 1:58 pm
by superdezign
Try including Sha256.class.php instead of hash_sha256.php.
Posted: Wed Jul 25, 2007 2:33 pm
by feyd
If memory serves, the array type hint was added in 5.1. I'll make a note to take that bit out in the next test release.
Also, as a reminder to everyone using the existing test builds, since this is an Alpha level release, the interface isn't 100% solid. I am mulling over a few changes that will alter the interface of the classes some. If possible, I will maintain compatibility with the existing interface, but some of the changes may just not hold. Sorry for any inconvenience that may cause anyone.
Hopefully with summer school wrapping up in a few weeks, I'll get some time to bang out a few more alphas, hopefully go into beta.
Posted: Wed Jul 25, 2007 4:25 pm
by KalleL
superdezign wrote:Try including Sha256.class.php instead of hash_sha256.php.
Tried it too.
Number of characters
Posted: Wed Oct 10, 2007 2:24 pm
by feinstimmer
Stuped qestion: how manu characters sha256 returns when hashing string(password)?
Thanks.
Re: Number of characters
Posted: Wed Oct 10, 2007 4:55 pm
by feyd
feinstimmer wrote:Stuped qestion: how manu characters sha256 returns when hashing string(password)?
Thanks.
A simple test on your behalf would have told you.
It returns a 256bit result. In hex that's 64 bytes.