Avatar
もしかして Swift って HashDoS の脆弱性がある? $ swift Welcome to Apple Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2). Type :help for assistance. 1> "ABC".hashValue $R0: Int = 4799450059697352752 2> ^D $ swift Welcome to Apple Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2). Type :help for assistance. 1> "ABC".hashValue $R0: Int = 4799450059697352752 2> ^D と思ったけど Linux だと違った。 $ swift Welcome to Swift version 4.0 (swift-4.0-RELEASE). Type :help for assistance. 1> "ABC".hashValue $R0: Int = -7254897348427143244 2> ^D $ swift Welcome to Swift version 4.0 (swift-4.0-RELEASE). Type :help for assistance. 1> "ABC".hashValue $R0: Int = 6530406984862401526 2> ^D Mac / iOS はアプリだしまあ問題ない?