mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
format sha1 string
This commit is contained in:
parent
f17785ffc7
commit
a8c3d5f104
1 changed files with 11 additions and 1 deletions
|
@ -84,13 +84,23 @@ Future<bool> showBadX509CertificateDialog(
|
|||
int port,
|
||||
BuildContext context,
|
||||
) async {
|
||||
final chars = Format.uint8listToString(cert.sha1)
|
||||
.toUpperCase()
|
||||
.characters
|
||||
.toList(growable: false);
|
||||
|
||||
String sha1 = chars.sublist(0, 2).join();
|
||||
for (int i = 2; i < chars.length; i += 2) {
|
||||
sha1 += ":${chars.sublist(i, i + 2).join()}";
|
||||
}
|
||||
|
||||
final result = await showDialog<bool>(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) {
|
||||
return StackDialog(
|
||||
title: "Untrusted X509Certificate",
|
||||
message: "SHA1: ${Format.uint8listToString(cert.sha1)}",
|
||||
message: "SHA1:\n$sha1",
|
||||
leftButton: SecondaryButton(
|
||||
label: "Cancel",
|
||||
onPressed: () {
|
||||
|
|
Loading…
Reference in a new issue