Add support for sending using a QR code

closes #196
This commit is contained in:
Grishka
2025-08-07 04:59:01 +03:00
parent f75f5fb1f0
commit ad1c47012f
11 changed files with 426 additions and 27 deletions

View File

@@ -21,6 +21,13 @@ extension Data{
})
}
func suffixOfAtMost(numBytes:Int) -> Data{
if count<=numBytes{
return self;
}
return subdata(in: count-numBytes..<count)
}
static func randomData(length: Int) -> Data{
var data=Data(count: length)
data.withUnsafeMutableBytes {