Rename "PhabricatorHash::digest()" to "weakDigest()"

Summary: Ref T12509. This encourages code to move away from HMAC+SHA1 by making the method name more obviously undesirable.

Test Plan: `grep`, browsed around.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12509

Differential Revision: https://secure.phabricator.com/D17632
This commit is contained in:
epriestley
2017-04-06 10:08:46 -07:00
parent 3a3626834e
commit 3d816e94df
20 changed files with 31 additions and 28 deletions

View File

@@ -652,7 +652,7 @@ final class DiffusionServeController extends DiffusionController {
}
$lfs_pass = $password->openEnvelope();
$lfs_hash = PhabricatorHash::digest($lfs_pass);
$lfs_hash = PhabricatorHash::weakDigest($lfs_pass);
$token = id(new PhabricatorAuthTemporaryTokenQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())

View File

@@ -22,7 +22,7 @@ final class DiffusionGitLFSTemporaryTokenType
$lfs_user = self::HTTP_USERNAME;
$lfs_pass = Filesystem::readRandomCharacters(32);
$lfs_hash = PhabricatorHash::digest($lfs_pass);
$lfs_hash = PhabricatorHash::weakDigest($lfs_pass);
$ttl = PhabricatorTime::getNow() + phutil_units('1 day in seconds');