|
@@ -53,10 +53,12 @@ extension Updatable {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @discardableResult
|
|
|
public mutating func finish(withBytes bytes: ArraySlice<UInt8>) throws -> Array<UInt8> {
|
|
|
return try update(withBytes: bytes, isLast: true)
|
|
|
}
|
|
|
|
|
|
+ @discardableResult
|
|
|
public mutating func finish() throws -> Array<UInt8> {
|
|
|
return try update(withBytes: [], isLast: true)
|
|
|
}
|
|
@@ -75,6 +77,7 @@ extension Updatable {
|
|
|
|
|
|
extension Updatable {
|
|
|
|
|
|
+ @discardableResult
|
|
|
public mutating func update(withBytes bytes: Array<UInt8>, isLast: Bool = false) throws -> Array<UInt8> {
|
|
|
return try update(withBytes: bytes.slice, isLast: isLast)
|
|
|
}
|
|
@@ -83,6 +86,7 @@ extension Updatable {
|
|
|
return try update(withBytes: bytes.slice, isLast: isLast, output: output)
|
|
|
}
|
|
|
|
|
|
+ @discardableResult
|
|
|
public mutating func finish(withBytes bytes: Array<UInt8>) throws -> Array<UInt8> {
|
|
|
return try finish(withBytes: bytes.slice)
|
|
|
}
|