mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-27 00:15:26 -04:00
encryption work
This commit is contained in:
parent
fe49beba9f
commit
9d8b609844
5 changed files with 74 additions and 55 deletions
|
@ -2,10 +2,9 @@ import 'package:veilid/veilid.dart';
|
|||
import 'dart:typed_data';
|
||||
import 'dart:convert';
|
||||
|
||||
extension FromValueDataJsonExt on ValueData {
|
||||
T readJsonData<T>(T Function(Map<String, dynamic>) fromJson) {
|
||||
return fromJson(jsonDecode(utf8.decode(data)));
|
||||
}
|
||||
T jsonDecodeBytes<T>(
|
||||
T Function(Map<String, dynamic>) fromJson, Uint8List data) {
|
||||
return fromJson(jsonDecode(utf8.decode(data)));
|
||||
}
|
||||
|
||||
Uint8List jsonEncodeBytes(Object? object,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue