}
+ function testDecryptPrivateKey() {
+
+ // test successful decrypt
+ $crypted = Encryption\Crypt::symmetricEncryptFileContent($this->genPrivateKey, 'hat');
+
+ $decrypted = Encryption\Crypt::decryptPrivateKey($crypted, 'hat');
+
+ $this->assertEquals($this->genPrivateKey, $decrypted);
+
+ //test private key decrypt with wrong password
+ $wrongPasswd = Encryption\Crypt::decryptPrivateKey($crypted, 'hat2');
+
+ $this->assertEquals(false, $wrongPasswd);
+
+ }
+
++
+ /**
+ * @medium
+ */
function testSymmetricEncryptFileContent() {
# TODO: search in keyfile for actual content as IV will ensure this test always passes