blueimp/JavaScript-MD5

这个js加密后。服务端该怎么解密呢?

memoryoverflow opened this issue · 6 comments

这个js加密后。服务端该怎么解密呢?

如果是密码,一般服务器也不直接存储明文密码,而是存储加密后的内容和当时加密的方式,然后进行对比。

Hi @memoryoverflow,

I've translated your question using Google Translate as unfortunately, I don't speak chinese:

After this js is encrypted. How should the server decrypt it?

MD5 is a Cryptographic hash function and not an encryption algorithm.

A typical use case is to hash input data for later comparison against the same hash value.
e.g. the Gravatar service stores profile pictures and maps the MD5 sum of an email address to a stored profile picture. This way, you can reference profile pictures of your users without having to expose their email addresses.

Please note that MD5 should not be used to generate hashes for sensitive data, as it's cryptographically broken.

明白了 这个是不可逆的,也只能通过明文进行md5 后比对。是这样子的吗

@ZhangChengLin

I've translated your comment as well:

If it is a password, the general server does not directly store the plaintext password, but stores the encrypted content and the encryption method at that time, and then compares it.

Please do not use MD5 to store password hashes, as it is inherently insecure.
Instead, use a password hashing function designed for this use case, such as PBKDF2, scrypt or Argon2.

明白了 这个是不可逆的,也只能通过明文进行md5 后比对。是这样子的吗

在这整个GitHub网站中,请使用英语进行交流提问,能得到作者和维护者的更合适的解答。

In this entire GitHub website, please use English to communicate and ask questions to get more appropriate answers from the author and maintainer.

Closing this as solved.