Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php final class PhabricatorAuthPasswordUpgradeTransaction extends PhabricatorAuthPass..

Decoded Output download

<?php

final class PhabricatorAuthPasswordUpgradeTransaction
  extends PhabricatorAuthPasswordTransactionType {

  const TRANSACTIONTYPE = 'password.upgrade';

  public function generateOldValue($object) {
    $old_hasher = $this->getEditor()->getOldHasher();

    if (!$old_hasher) {
      throw new PhutilInvalidStateException('setOldHasher');
    }

    return $old_hasher->getHashName();
  }

  public function generateNewValue($object, $value) {
    return $value;
  }

  public function getTitle() {
    return pht(
      '%s upgraded the hash algorithm for this password from "%s" to "%s".',
      $this->renderAuthor(),
      $this->renderOldValue(),
      $this->renderNewValue());
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorAuthPasswordUpgradeTransaction
  extends PhabricatorAuthPasswordTransactionType {

  const TRANSACTIONTYPE = 'password.upgrade';

  public function generateOldValue($object) {
    $old_hasher = $this->getEditor()->getOldHasher();

    if (!$old_hasher) {
      throw new PhutilInvalidStateException('setOldHasher');
    }

    return $old_hasher->getHashName();
  }

  public function generateNewValue($object, $value) {
    return $value;
  }

  public function getTitle() {
    return pht(
      '%s upgraded the hash algorithm for this password from "%s" to "%s".',
      $this->renderAuthor(),
      $this->renderOldValue(),
      $this->renderNewValue());
  }

}

Function Calls

None

Variables

None

Stats

MD5 6e05783fd726c50cde6a9150aaa73e60
Eval Count 0
Decode Time 80 ms