When looking at hashing algorithms there's a whole lot of factors to consider.
A few of the common considerations are: 1. performance. 2. cryptographic or not. 3. collision rate including avalanche effect and bit-size. There are a bunch of other considerations but those are some high-level concerns that will often come up when considering a hash function. In the case of AES256 it is a cryptographically secure algorithm which often implies a tradeoff in performance. Depending on your needs an alternative algorithm might be more appropriate such as FNV (available in stdlib), murmur, CityHash, etc that aren't cryptographically secure but provide generally good hashing properties in terms of collision rate and performance. Cheers, Nathan On Tue, Aug 2, 2022 at 7:32 PM Alex Breadman <a...@cpu.host> wrote: > package mod > > import ( > "testing" > ) > > func TestEncrypt(t *testing.T) { > password := []byte("*RTFUGIHOD&TUGGIYKl") > data := []byte("This encryption algorithm is faster than aes256 up to 40kb > but how secure is it?") > for x, _ := range data { > p := (password[x%len(password)]) > data[x] = data[x] + byte(p) > } > println(string(data)) > for x, _ := range data { > p := (password[x%len(password)]) > data[x] = data[x] - byte(p) > } > println(string(data)) > } > > Surely it is only as strong as the password? > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/1c8a67cb-d7da-4c41-a8c5-92727d24e773n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/1c8a67cb-d7da-4c41-a8c5-92727d24e773n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Nathan Fisher w: http://junctionbox.ca/ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CA%2Bc2dWfg%3DuhL7FPeHq54QjtvRwf%3DPN-UaC1E2%3DHmYrTC_ENCpQ%40mail.gmail.com.