CHGenerator/Sources/Generator/Extensions/Digest+Extension.swift
2022-09-18 16:45:34 +02:00

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()
}
}