mirror of
https://github.com/hackku21/loc-chain-app.git
synced 2024-10-27 20:34:05 +00:00
fixes
This commit is contained in:
parent
7a50af0cf6
commit
b8e057c341
@ -207,12 +207,16 @@ class _HomePageState extends State<HomePage> {
|
|||||||
combinedHash: transaction.hash,
|
combinedHash: transaction.hash,
|
||||||
encodedGPSLocation: "{'none':true}",
|
encodedGPSLocation: "{'none':true}",
|
||||||
partnerPublicKey: transaction.pubKey,
|
partnerPublicKey: transaction.pubKey,
|
||||||
validationSignature: await OpenPGP.encrypt(
|
validationSignature: await OpenPGP.sign(
|
||||||
transaction.hash, KeyFileManager.keyPair.privateKey),
|
transaction.hash,
|
||||||
|
transaction.pubKey,
|
||||||
|
KeyFileManager.keyPair.publicKey,
|
||||||
|
'',
|
||||||
|
),
|
||||||
);
|
);
|
||||||
var response = await postEncounter(encounter);
|
var response = await postEncounter(encounter);
|
||||||
print(response);
|
print(response);
|
||||||
showSnackbar(response.body);
|
// showSnackbar(response.body);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPayloadTransferUpdate: (endid, payloadTransferUpdate) {
|
onPayloadTransferUpdate: (endid, payloadTransferUpdate) {
|
||||||
|
@ -34,7 +34,7 @@ class _KeygenState extends State<KeygenPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> initKeyPair() async {
|
Future<void> initKeyPair() async {
|
||||||
var options = KeyOptions()..rsaBits = 2048;
|
var options = KeyOptions()..rsaBits = 512;
|
||||||
var keyPair =
|
var keyPair =
|
||||||
await OpenPGP.generate(options: Options()..keyOptions = options);
|
await OpenPGP.generate(options: Options()..keyOptions = options);
|
||||||
await KeyFileManager.writeKeyPair(keyPair);
|
await KeyFileManager.writeKeyPair(keyPair);
|
||||||
|
@ -14,8 +14,7 @@ class Transaction {
|
|||||||
var lesser = idLess ? id : otherUserId;
|
var lesser = idLess ? id : otherUserId;
|
||||||
var greater = idLess ? otherUserId : id;
|
var greater = idLess ? otherUserId : id;
|
||||||
return Transaction(
|
return Transaction(
|
||||||
hash: DBCrypt()
|
hash: DBCrypt().hashpw("$lesser-$greater", DBCrypt().gensalt()),
|
||||||
.hashpw("$lesser-$greater", KeyFileManager.keyPair.privateKey),
|
|
||||||
pubKey: KeyFileManager.keyPair.publicKey,
|
pubKey: KeyFileManager.keyPair.publicKey,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user