<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Encode on Gopher Coding</title><link>https://gophercoding.com/tags/encode/</link><description>Recent content in Encode on Gopher Coding</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 02 Apr 2023 12:13:48 +0100</lastBuildDate><atom:link href="https://gophercoding.com/tags/encode/index.xml" rel="self" type="application/rss+xml"/><item><title>MD5 Encoding in Golang</title><link>https://gophercoding.com/md5-encode-in-golang/</link><pubDate>Sun, 12 Feb 2023 09:00:00 +0000</pubDate><guid>https://gophercoding.com/md5-encode-in-golang/</guid><description>&lt;p>You can use the &lt;code>crypto/md5&lt;/code> [&lt;a href="https://pkg.go.dev/crypto/md5">docs&lt;/a>] package in Go to perform MD5 encoding on a string. We have an example function below, it will take your string and write it as a hash. Then convert that binary back into a hexadecimal string using &lt;code>Sprintf&lt;/code>.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> There are &lt;a href="https://security.stackexchange.com/questions/19906/is-md5-considered-insecure">more modern approaches&lt;/a> than md5 these days - and it isn&amp;rsquo;t recommended for many things, but definitely not password hashing.&lt;/p>
&lt;p>Here&amp;rsquo;s an example of how to use it:&lt;/p></description></item></channel></rss>