(self, message: str)
| 571 | return r |
| 572 | |
| 573 | def hash_message(self, message: str): |
| 574 | binaryMessage = self.encode(message) |
| 575 | binaryMessageLength = self.binary_length(binaryMessage) |
| 576 | x19 = self.base16_to_binary('19') |
| 577 | newline = self.base16_to_binary('0a') |
| 578 | prefix = self.binary_concat(x19, self.encode('Ethereum Signed Message:'), newline, self.encode(self.number_to_string(binaryMessageLength))) |
| 579 | return '0x' + self.hash(self.binary_concat(prefix, binaryMessage), 'keccak', 'hex') |
| 580 | |
| 581 | def sign_hash(self, hash, privateKey): |
| 582 | self.check_required_credentials() |
no test coverage detected