Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
Sha3StaticTest.php
Go to the documentation of this file.
1 <?php
2 namespace Ethereum;
5 
11 class Sha3StaticTest extends TestStatic {
12 
13  public function kessacStringProvider() {
14  // UTF8 text, Kessac256
15  return [
16  ['Hello world!', '0xecd0e108a98e192af1d2c25055f4e3bed784b5c877204e73219a5203251feaab'],
17  ["\n", '0x0ef9d8f8804d174666011a394cab7901679a8944d24249fd148a6a36071151f8'],
18  ['1', '0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6'],
19  ['-1', '0x798272c22de7de1bbb41d9d76b5240e67bb83e9ece1afeb940834536b3646693'],
20  ['testing', '0x5f16f4c7f149ac4f9510d9cf8cf384038ad348b3bcdc01915f95de12df9d1b02'],
21  ['', '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'],
22  ];
23  }
24 
32  public function testManyStrings($text, $sha3)
33  {
34  $this->assertSame($sha3, EthereumStatic::sha3($text));
35  }
36 
37 }
testManyStrings($text, $sha3)
Definition: Abi.php:3