You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
'withUnsafeBytes' is deprecated: use
withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R
instead
in file
// String+MD5.swift
extension Kingfisher where Base == String {
public var md5: String {
if let data = base.data(using: .utf8, allowLossyConversion: true) {
var byteBuffer: [UInt8] = []
data.withUnsafeBytes {
byteBuffer.append(contentsOf: $0)
let MD5Calculator = MD5(byteBuffer)
let MD5Data = MD5Calculator.calculate()
var MD5String = String()
for c in MD5Data {
MD5String += String(format: "%02x", c)
return MD5String
} else {
return base