ECDSAMock.sol 399 B

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