ECRecoveryMock.sol 383 B

12345678910111213141516171819202122232425
  1. pragma solidity ^0.4.24;
  2. import "../ECRecovery.sol";
  3. contract ECRecoveryMock {
  4. using ECRecovery for bytes32;
  5. function recover(bytes32 hash, bytes sig)
  6. public
  7. pure
  8. returns (address)
  9. {
  10. return hash.recover(sig);
  11. }
  12. function toEthSignedMessageHash(bytes32 hash)
  13. public
  14. pure
  15. returns (bytes32)
  16. {
  17. return hash.toEthSignedMessageHash();
  18. }
  19. }