什么是基地64编码的目的以及为何在HTTP基本身份验证使用吗?

问题描述:

我不明白的Base64编码加密。

I don't get the Base64 encryption.

如果可以解密一个Base64字符串,什么是它的目的是什么?

If one can decrypt a Base64 string, what is it's purpose?

为什么被用于HTTP基本认证?

Why is it being used for HTTP Basic auth?

这就像透露给任何人我的密码被逆转到东海生日贺。

It's like telling to someone my password is reversed into OLLEH.

人们看到东海生日贺都知道原来的密码是HELLO。

People seeing OLLEH will know the original password was HELLO.

Base64是不加密 - 这是一个编码。这是再presenting二进制数据只使用可打印(文本)字符的方式。

Base64 is not encryption -- it's an encoding. It's a way of representing binary data using only printable (text) characters.

请参阅从*页面这款HTTP基本验证

在编码具有Base64编码算法的用户名和密码,通常使他们无法读取通过肉眼,他们是那样容易去codeD,因为他们都带codeD。安全性不编码步骤的意图。相反,编码的目的是为en code非HTTP兼容的字符可能是用户名或密码为那些HTTP兼容。

While encoding the user name and password with the Base64 algorithm typically makes them unreadable by the naked eye, they are as easily decoded as they are encoded. Security is not the intent of the encoding step. Rather, the intent of the encoding is to encode non-HTTP-compatible characters that may be in the user name or password into those that are HTTP-compatible.