@@ -202,11 +202,9 @@ public struct Utilities {
202202 }
203203
204204 /// Recover the Ethereum address from recoverable secp256k1 signature. Message is first hashed using the "personal hash" protocol.
205- /// BE WARNED - changing a message will result in different Ethereum address, but not in error.
206- ///
207- /// Input parameters should be Data objects.
205+ /// BE WARNED - changing a message will result in different Ethereum address, but not in an error.
208206 public static func personalECRecover( _ personalMessage: Data , signature: Data ) -> EthereumAddress ? {
209- if signature. count != 65 { return nil }
207+ if signature. count != 65 { return nil }
210208 let rData = signature [ 0 ..< 32 ] . bytes
211209 let sData = signature [ 32 ..< 64 ] . bytes
212210 var vData = signature [ 64 ]
@@ -226,10 +224,8 @@ public struct Utilities {
226224
227225 /// Recover the Ethereum address from recoverable secp256k1 signature.
228226 /// Takes a hash of some message. What message is hashed should be checked by user separately.
229- ///
230- /// Input parameters should be Data objects.
231227 public static func hashECRecover( hash: Data , signature: Data ) -> EthereumAddress ? {
232- if signature. count != 65 { return nil }
228+ if signature. count != 65 { return nil }
233229 let rData = signature [ 0 ..< 32 ] . bytes
234230 let sData = signature [ 32 ..< 64 ] . bytes
235231 var vData = signature [ 64 ]
0 commit comments