mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-25 17:12:23 +01:00
19 lines
356 B
Swift
19 lines
356 B
Swift
|
//
|
|||
|
// DatabaseID.swift
|
|||
|
// Data
|
|||
|
//
|
|||
|
// Created by Brent Simmons on 7/15/17.
|
|||
|
// Copyright © 2017 Ranchero Software. All rights reserved.
|
|||
|
//
|
|||
|
|
|||
|
import Foundation
|
|||
|
|
|||
|
// MD5 works because:
|
|||
|
// * It’s fast
|
|||
|
// * Collisions aren’t going to happen with feed data
|
|||
|
|
|||
|
public func databaseIDWithString(_ s: String) -> String {
|
|||
|
|
|||
|
return (s as NSString).rs_md5Hash()
|
|||
|
}
|