Base58GMPEvent.php 552 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace StephenHill\Benchmarks;
  3. use Athletic\AthleticEvent;
  4. use StephenHill\Base58;
  5. use StephenHill\GMPService;
  6. class Base58GMPEvent extends AthleticEvent
  7. {
  8. protected $base58;
  9. public function setUp()
  10. {
  11. $this->base58 = new Base58(null, new GMPService());
  12. }
  13. /**
  14. * @iterations 10000
  15. */
  16. public function encodeBase58()
  17. {
  18. $this->base58->encode('Hello World');
  19. }
  20. /**
  21. * @iterations 10000
  22. */
  23. public function decodeBase58()
  24. {
  25. $this->base58->decode('JxF12TrwUP45BMd');
  26. }
  27. }