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,
|
||||
encodedGPSLocation: "{'none':true}",
|
||||
partnerPublicKey: transaction.pubKey,
|
||||
validationSignature: await OpenPGP.encrypt(
|
||||
transaction.hash, KeyFileManager.keyPair.privateKey),
|
||||
validationSignature: await OpenPGP.sign(
|
||||
transaction.hash,
|
||||
transaction.pubKey,
|
||||
KeyFileManager.keyPair.publicKey,
|
||||
'',
|
||||
),
|
||||
);
|
||||
var response = await postEncounter(encounter);
|
||||
print(response);
|
||||
showSnackbar(response.body);
|
||||
// showSnackbar(response.body);
|
||||
}
|
||||
},
|
||||
onPayloadTransferUpdate: (endid, payloadTransferUpdate) {
|
||||
|
@ -34,7 +34,7 @@ class _KeygenState extends State<KeygenPage> {
|
||||
}
|
||||
|
||||
Future<void> initKeyPair() async {
|
||||
var options = KeyOptions()..rsaBits = 2048;
|
||||
var options = KeyOptions()..rsaBits = 512;
|
||||
var keyPair =
|
||||
await OpenPGP.generate(options: Options()..keyOptions = options);
|
||||
await KeyFileManager.writeKeyPair(keyPair);
|
||||
|
@ -14,8 +14,7 @@ class Transaction {
|
||||
var lesser = idLess ? id : otherUserId;
|
||||
var greater = idLess ? otherUserId : id;
|
||||
return Transaction(
|
||||
hash: DBCrypt()
|
||||
.hashpw("$lesser-$greater", KeyFileManager.keyPair.privateKey),
|
||||
hash: DBCrypt().hashpw("$lesser-$greater", DBCrypt().gensalt()),
|
||||
pubKey: KeyFileManager.keyPair.publicKey,
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user