# Base64 decode or any other one-to-one hash creator from a seed in motoko

**URL:** <https://forum.dfinity.org/t/base64-decode-or-any-other-one-to-one-hash-creator-from-a-seed-in-motoko/6377>\
**Category:** Developers\
**Created:** [August 9, 2021, 3:41pm UTC](https://forum.dfinity.org/t/base64-decode-or-any-other-one-to-one-hash-creator-from-a-seed-in-motoko/6377 "2021-08-09T15:41:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehsan6sha](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ehsan6sha/32/2460_2.png) [@ehsan6sha](https://forum.dfinity.org/u/ehsan6sha)\
**Post date:** [August 9, 2021, 3:41pm UTC](https://forum.dfinity.org/t/base64-decode-or-any-other-one-to-one-hash-creator-from-a-seed-in-motoko/6377/1 "2021-08-09T15:41:33Z")

</div>

Hi  
I was wondering if there is any library in Motoko that can create a simple hashed string(even a base64decode) from a seed ? I prefer it being one-way encryption like sha512, however, I do not mind if that is not an option and get a decode-able like base64.

---

<div class="post-metadata">

**Author:** ![CarstenJ](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/carstenj/32/2729_2.png) [@CarstenJ](https://forum.dfinity.org/u/CarstenJ)\
**Post date:** [August 9, 2021, 3:54pm UTC](https://forum.dfinity.org/t/base64-decode-or-any-other-one-to-one-hash-creator-from-a-seed-in-motoko/6377/2 "2021-08-09T15:54:54Z")

</div>

Yes, there is, look at this: [Hash :: Internet Computer](https://sdk.dfinity.org/docs/base-libraries/hash)

---

<div class="post-metadata">

**Author:** ![claudio](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/claudio/32/322_2.png) [@claudio](https://forum.dfinity.org/u/claudio)\
**Post date:** [August 9, 2021, 6:49pm UTC](https://forum.dfinity.org/t/base64-decode-or-any-other-one-to-one-hash-creator-from-a-seed-in-motoko/6377/3 "2021-08-09T18:49:29Z")

</div>

I probably don’t understand your question (I’m not a crypto person), but if its any help, there is this:

> **[GitHub - enzoh/motoko-sha: The SHA Package](https://github.com/enzoh/motoko-sha)**
>
> The SHA Package. Contribute to enzoh/motoko-sha development by creating an account on GitHub.

which you may be able to use or adapt to SHA-512.

If you just need simple (non cryptographic) hash function on Text values, the Text library provides this:

> **[Internet Computer | Documentation](https://sdk.dfinity.org/docs/base-libraries/text#hash)**
>
> Documentation for the internet computer.

---

<div class="post-metadata">

**Author:** ![ehsan6sha](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ehsan6sha/32/2460_2.png) [@ehsan6sha](https://forum.dfinity.org/u/ehsan6sha)\
**Post date:** [August 9, 2021, 6:50pm UTC](https://forum.dfinity.org/t/base64-decode-or-any-other-one-to-one-hash-creator-from-a-seed-in-motoko/6377/4 "2021-08-09T18:50:48Z")

</div>

Both excatly as I needed! Thank you
