File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
web3swift/Convenience/Classes Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import Foundation
9
9
import struct BigInt. BigUInt
10
10
11
11
public extension BigUInt {
12
- public init ? ( _ naturalUnits: String , _ ethereumUnits: Web3 . Utils . Units ) {
12
+ init ? ( _ naturalUnits: String , _ ethereumUnits: Web3 . Utils . Units ) {
13
13
guard let value = Web3 . Utils. parseToBigUInt ( naturalUnits, units: ethereumUnits) else { return nil }
14
14
self = value
15
15
}
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public extension Data {
19
19
}
20
20
}
21
21
22
- public func constantTimeComparisonTo( _ other: Data ? ) -> Bool {
22
+ func constantTimeComparisonTo( _ other: Data ? ) -> Bool {
23
23
guard let rhs = other else { return false }
24
24
guard self . count == rhs. count else { return false }
25
25
var difference = UInt8 ( 0x00 )
@@ -29,7 +29,7 @@ public extension Data {
29
29
return difference == UInt8 ( 0x00 )
30
30
}
31
31
32
- public static func zero( _ data: inout Data ) {
32
+ static func zero( _ data: inout Data ) {
33
33
let count = data. count
34
34
data. withUnsafeMutableBytes { ( dataPtr: UnsafeMutablePointer < UInt8 > ) in
35
35
// var rawPtr = UnsafeMutableRawPointer(dataPtr)
Original file line number Diff line number Diff line change @@ -372,20 +372,20 @@ public struct RIPEMD160 {
372
372
373
373
public extension RIPEMD160 {
374
374
375
- public static func hash( message: Data ) -> Data {
375
+ static func hash( message: Data ) -> Data {
376
376
var md = RIPEMD160 ( )
377
377
md. update ( data: message)
378
378
return md. finalize ( )
379
379
}
380
380
381
- public static func hash( message: String ) -> Data {
381
+ static func hash( message: String ) -> Data {
382
382
return RIPEMD160 . hash ( message: message. data ( using: . utf8) !)
383
383
}
384
384
}
385
385
386
386
public extension RIPEMD160 {
387
387
388
- public static func hmac( key: Data , message: Data ) -> Data {
388
+ static func hmac( key: Data , message: Data ) -> Data {
389
389
390
390
var key = key
391
391
key. count = 64 // Truncate to 64 bytes or fill-up with zeros.
@@ -404,11 +404,11 @@ public extension RIPEMD160 {
404
404
return outerMd. finalize ( )
405
405
}
406
406
407
- public static func hmac( key: Data , message: String ) -> Data {
407
+ static func hmac( key: Data , message: String ) -> Data {
408
408
return RIPEMD160 . hmac ( key: key, message: message. data ( using: . utf8) !)
409
409
}
410
410
411
- public static func hmac( key: String , message: String ) -> Data {
411
+ static func hmac( key: String , message: String ) -> Data {
412
412
return RIPEMD160 . hmac ( key: key. data ( using: . utf8) !, message: message)
413
413
}
414
414
}
You can’t perform that action at this time.
0 commit comments