aboutsummaryrefslogtreecommitdiff
path: root/src/tools/hash-text/hash-text.vue
diff options
context:
space:
mode:
authorGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2022-04-04 00:39:20 +0200
committerGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2022-04-04 00:39:20 +0200
commit4ca5fce911c3312d56bca1ffba863b2f37841c9e (patch)
treeca44211b4b5f5082d08014c0e7adbd008a74b678 /src/tools/hash-text/hash-text.vue
parent0f3b7445ad1f945d9b364476147bf824ac309a6c (diff)
downloadit-tools-4ca5fce911c3312d56bca1ffba863b2f37841c9e.tar.gz
it-tools-4ca5fce911c3312d56bca1ffba863b2f37841c9e.tar.zst
it-tools-4ca5fce911c3312d56bca1ffba863b2f37841c9e.zip
fix(hash-text): added missing toString()
Diffstat (limited to 'src/tools/hash-text/hash-text.vue')
-rw-r--r--src/tools/hash-text/hash-text.vue6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/hash-text/hash-text.vue b/src/tools/hash-text/hash-text.vue
index 30a97b8..45364a3 100644
--- a/src/tools/hash-text/hash-text.vue
+++ b/src/tools/hash-text/hash-text.vue
@@ -17,7 +17,7 @@
<br />
<n-input
style="text-align: center;"
- v-model:value="hashedText"
+ :value="hashedText"
type="textarea"
placeholder="Your string hash"
:autosize="{ minRows: 1 }"
@@ -61,9 +61,9 @@ const algos = {
RIPEMD160,
} as const;
-const clearText = ref('Lorem ipsum')
-const hashedText = computed(() => algos[algo.value](clearText.value))
+const clearText = ref('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lacus metus blandit dolor lacus natoque ad fusce aliquam velit.')
const algo = ref<keyof typeof algos>('SHA256')
+const hashedText = computed(() => algos[algo.value](clearText.value).toString())
const { copy } = useCopy({ source: hashedText, text: 'Token copied to the clipboard' })
</script>