Skip to content

Commit 2013c2f

Browse files
author
Eric Wu
committed
md5 加密
1 parent c25ab1d commit 2013c2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CRBoostSwift/Classes/Foundation+CRBoost.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ extension String {
6161
return self .sizeWithFont(font: font, maxSize: CGSize(width: width, height: CGFloat.greatestFiniteMagnitude)).height
6262
}
6363
@discardableResult
64-
public func md5String(string: String) -> String {
64+
public func md5String() -> String {
6565
let length = Int(CC_MD5_DIGEST_LENGTH)
66-
let messageData = string.data(using: .utf8)!
66+
let messageData = self.data(using: .utf8)!
6767
var digestData = Data(count: length)
6868
_ = digestData.withUnsafeMutableBytes { digestBytes -> UInt8 in
6969
messageData.withUnsafeBytes { messageBytes -> UInt8 in

0 commit comments

Comments
 (0)