/**
  * @test
  */
 public function testCrypt()
 {
     $crypt = new Rijandel256Crypt('e7b376817273f9403ce68bec818628b92094960fb1857475d92cce6fbd2cb565');
     $plain = md5(uniqid());
     $encrypted = $crypt->encrypt($plain);
     $this->assertEquals($plain, $crypt->decrypt($encrypted));
 }
Exemple #2
0
 /**
  * @return string
  */
 public function encryptData()
 {
     $this->encrypted = $this->crypt->encrypt(json_encode($this->data));
 }