14 lines
233 B
Swift
14 lines
233 B
Swift
import Foundation
|
|
import CryptoKit
|
|
|
|
extension Digest {
|
|
|
|
var bytes: [UInt8] { Array(makeIterator()) }
|
|
|
|
var data: Data { Data(bytes) }
|
|
|
|
var hexStr: String {
|
|
bytes.map { String(format: "%02X", $0) }.joined()
|
|
}
|
|
}
|