fix broken legacy tests
This commit is contained in:
parent
e7d1fe82aa
commit
cea9208cec
|
@ -652,7 +652,7 @@ class Crypt {
|
||||||
return $legacyEncKey;
|
return $legacyEncKey;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief encrypts content using legacy blowfish system
|
* @brief encrypts content using legacy blowfish system
|
||||||
* @param $content the cleartext message you want to encrypt
|
* @param $content the cleartext message you want to encrypt
|
||||||
|
@ -683,7 +683,7 @@ class Crypt {
|
||||||
|
|
||||||
$decrypted = $bf->decrypt( $content );
|
$decrypted = $bf->decrypt( $content );
|
||||||
|
|
||||||
return $decrypted;
|
return rtrim($decrypted, "\0");;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -595,7 +595,7 @@ class Test_Crypt extends \PHPUnit_Framework_TestCase {
|
||||||
*/
|
*/
|
||||||
function testLegacyKeyRecryptKeyfileEncrypt( $crypted ) {
|
function testLegacyKeyRecryptKeyfileEncrypt( $crypted ) {
|
||||||
|
|
||||||
$recrypted = Encryption\Crypt::LegacyKeyRecryptKeyfile( $crypted, $this->pass, $this->genPublicKey, $this->pass );
|
$recrypted = Encryption\Crypt::LegacyKeyRecryptKeyfile( $crypted, $this->pass, array($this->genPublicKey), $this->pass, '');
|
||||||
|
|
||||||
$this->assertNotEquals( $this->dataLong, $recrypted['data'] );
|
$this->assertNotEquals( $this->dataLong, $recrypted['data'] );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue