diff --git a/src/tools/htpasswd-generator/htpasswd-generator.vue b/src/tools/htpasswd-generator/htpasswd-generator.vue index 6638db22..6d947ca6 100644 --- a/src/tools/htpasswd-generator/htpasswd-generator.vue +++ b/src/tools/htpasswd-generator/htpasswd-generator.vue @@ -6,6 +6,7 @@ import TextareaCopyable from '@/components/TextareaCopyable.vue'; const username = ref(''); const password = ref(''); const hashMethod = ref('bcrypt'); +const saltCount = ref(10); const htpasswd = computed(() => { if (username.value === '' || password.value === '') { @@ -16,7 +17,7 @@ const htpasswd = computed(() => { hash = md5(password.value); } else { - hash = hashSync(password.value, 10); + hash = hashSync(password.value, saltCount.value); } return `${username.value}:${hash}`; }); @@ -46,6 +47,10 @@ const htpasswd = computed(() => { :options="['bcrypt', 'md5']" /> + + + +