File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 1- // swiftlint:disable comma function_parameter_count variable_name syntactic_sugar function_body_length vertical_whitespace
2-
3- // https://github.com/onmyway133/SwiftHash/blob/master/Sources/MD5.swift
4-
51/*
62 * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
73 * Digest Algorithm, as defined in RFC 1321.
@@ -103,13 +99,10 @@ func rstr_md5(_ input: [CUnsignedChar]) -> [CUnsignedChar] {
10399}
104100
105101/*
106- * Add integers, wrapping at 2^32. This uses 16-bit operations internally
107- * to work around bugs in some JS interpreters.
102+ * Add integers, wrapping at 2^32.
108103 */
109104func safe_add( _ x: Int32 , _ y: Int32 ) -> Int32 {
110- let lsw = ( x & 0xFFFF ) + ( y & 0xFFFF )
111- let msw = ( x >> 16 ) + ( y >> 16 ) + ( lsw >> 16 )
112- return ( msw << 16 ) | ( lsw & 0xFFFF )
105+ return x &+ y
113106}
114107
115108/*
You can’t perform that action at this time.
0 commit comments