简体   繁体   English

是否有Go版本的“基于MD5的分组密码”?

[英]Is there a Go version of the “MD5-based block cipher”?

I would like to implement a Go application that is going to send some private data to a server. 我想实现一个Go应用程序,该应用程序将一些私有数据发送到服务器。 The code on server is PHP and uses a "MD5-based block cipher". 服务器上的代码是PHP,并使用“基于MD5的分组密码”。 The PHP encrypt/decrypt code is here: http://www.jonasjohn.de/snippets/php/md5-based-block-cipher.htm PHP加密/解密代码在这里: http : //www.jonasjohn.de/snippets/php/md5-based-block-cipher.htm

Is there an equivalent routine in Go? Go中是否有一个等效的例程?

It looks like that code is similar to the MDC algorithm which is a way of making a cipher from a hash function. 看起来该代码类似于MDC算法 ,该算法是一种通过哈希函数生成密码的方法。

There are much better ciphers that that though - have a look in Go's crypto library . 尽管如此,还有更好的密码-在Go的加密库查看

If you are desperate to interoperate with that particular PHP code then you'll have to convert it to Go yourself I think, but if I had a choice I would choose a better cipher (something using AES). 如果您迫切希望与该特定的PHP代码进行互操作,那么您必须将其转换为Go Go,我认为,但是,如果我可以选择的话,我会选择一种更好的密码(使用AES的密码)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM