Docs for SecretKit (#306)

* Start docc

* Docs

* .

* More
This commit is contained in:
Max Goedjen
2022-01-01 18:10:44 -08:00
committed by GitHub
parent ee3e844519
commit 22d9b37d63
13 changed files with 162 additions and 9 deletions

View File

@@ -1,13 +1,18 @@
import Foundation
/// Reads OpenSSH protocol data.
public class OpenSSHReader {
var remaining: Data
/// Initialize the reader with an OpenSSH data payload.
/// - Parameter data: The data to read.
public init(data: Data) {
remaining = Data(data)
}
/// Reads the next chunk of data from the playload.
/// - Returns: The next chunk of data.
public func readNextChunk() -> Data {
let lengthRange = 0..<(UInt32.bitWidth/8)
let lengthChunk = remaining[lengthRange]