diff --git a/Sources/Generator/Extensions/Digest+Extension.swift b/Sources/Generator/Extensions/Digest+Extension.swift new file mode 100644 index 0000000..552686c --- /dev/null +++ b/Sources/Generator/Extensions/Digest+Extension.swift @@ -0,0 +1,13 @@ +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() + } +} diff --git a/Sources/Generator/Files/FileSystem.swift b/Sources/Generator/Files/FileSystem.swift index a9893ca..3a2656e 100644 --- a/Sources/Generator/Files/FileSystem.swift +++ b/Sources/Generator/Files/FileSystem.swift @@ -632,14 +632,3 @@ final class FileSystem { return output } } - -private extension Digest { - - var bytes: [UInt8] { Array(makeIterator()) } - - var data: Data { Data(bytes) } - - var hexStr: String { - bytes.map { String(format: "%02X", $0) }.joined() - } -}