Exemplo n.º 1
0
 public function testIfCrypterLibraryReturnsAnAccurateResult()
 {
     $cryptMethods = array('sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md2', 'md4', 'md5', 'ripemd128', 'ripemd160', 'ripemd256', 'ripemd320', 'whirlpool', 'snefru', 'snefru256', 'gost', 'crc32', 'crc32b', 'adler32');
     foreach ($cryptMethods as $key => $value) {
         $this->assertEquals(hash($value, $this->string), Crypt::crypter($value, $this->string));
     }
 }
Exemplo n.º 2
0
 public function lib()
 {
     $data['var'] = Crypt::crypter('sha1', 'my-string');
     $data['content'] = 'LibView';
     $this->render('includes/template', compact('data'));
 }