use hashed password in json

pull/2/head
axtlos 3 years ago
parent ad6669ac35
commit 1fbab90868
No known key found for this signature in database
GPG Key ID: A468AFD71DD51D4A

@ -5,7 +5,7 @@ pkgrel=1
pkgdesc="Flutter GUI for installing crystal"
arch=('any')
url="https://git.tar.black/crystal/programs/jade_gui"
depends=('gtk3' 'jade')
depends=('gtk3' 'jade' 'openssl')
makedepends=('clang' 'ninja' 'cmake' 'git' 'unzip' 'flutter' 'flutter-group-pacman-hook')
source=("gui::git+${url}.git")

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'dart:io';
final _formKey = GlobalKey<FormState>();
RegExp userRegex = RegExp(r'^[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}\$)$');
@ -7,7 +8,7 @@ Widget users(
enableSudo,
setPass,
setConfirmPass,
password,
clearPass,
confirmPassword,
setUsername,
username,
@ -151,7 +152,7 @@ Widget users(
setConfirmPass(value);
},
validator: (String? value) {
return (value != password)
return (value != clearPass)
? 'Password does not match'
: null;
},

@ -27,6 +27,8 @@ Future<void> checkIsEfi(setState) async {
setState(isEfi);
}
void writeToLog() {}
void main() => runApp(
const MaterialApp(
debugShowCheckedModeBanner: false,
@ -34,6 +36,16 @@ void main() => runApp(
),
);
Future<void> setPassword(clearPass, setState) async {
final String password =
await Process.run("openssl", ["passwd", "-1", clearPass])
.then((ProcessResult result) {
return result.stdout;
});
debugPrint(password);
setState(password);
}
class Jadegui extends StatefulWidget {
const Jadegui({Key? key}) : super(key: key);
@ -51,6 +63,7 @@ class _JadeguiState extends State<Jadegui> {
bool ipv6 = false;
bool enableTimeshift = true;
bool running = false;
String clearPass = "";
String password = "";
String confirmPassword = "";
String username = "";
@ -315,7 +328,12 @@ class _JadeguiState extends State<Jadegui> {
(String? value) {
setState(() {
if (value != null) {
password = value;
setPassword(value, (String encPass) {
setState(() {
password = encPass;
clearPass = value;
});
});
}
});
},
@ -324,7 +342,7 @@ class _JadeguiState extends State<Jadegui> {
confirmPassword = value;
});
},
password,
clearPass,
confirmPassword,
(value) {
setState(() {
@ -360,6 +378,7 @@ class _JadeguiState extends State<Jadegui> {
);
break;
case 4:
debugPrint(password);
widget = desktopView(
currDesktop,
(selectedDesktop) {

@ -0,0 +1 @@
#

@ -0,0 +1,8 @@
fn main() {
// generate task scheduler
let mut sched = TaskScheduler::new();
// create a task
let task = sched.create_task(|| {
println!("Hello, world!");
});
}
Loading…
Cancel
Save