public function testNewApiSetKey() { $text = "testme"; $key = "frop"; $salt = sha1("saltgeneration"); $crypt = new ar_crypt($key, MCRYPT_RIJNDAEL_256, 1); $generatedkey = $crypt->pbkdf2($key, $salt); $crypt->setKey($generatedkey); $encoded = $crypt->crypt($text); $decoded = $crypt->decrypt($encoded); $this->assertEquals($text, $decoded); }