基础64编码的目的是什么,为什么它用于HTTP基本认证? [英] What is the purpose of base 64 encoding and why it used in HTTP Basic Authentication?

查看:96
本文介绍了基础64编码的目的是什么,为什么它用于HTTP基本认证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有得到Base64加密。

I don't get the Base64 encryption.

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

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

为什么是用于HTTP Basic auth?

Why is it being used for HTTP Basic auth?

这就像告诉某人我的密码被翻转成OLLEH。

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

看到OLLEH的人会知道原来的密码是HELLO。

People seeing OLLEH will know the original password was HELLO.

推荐答案

Base64不是加密 - 一个编码。这是一种仅使用可打印(文字)字符表示二进制数据的方式。

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

请参阅 HTTP基本认证的维基百科页面


编码用户名和密码使用Base64算法通常会使它们不能被肉眼看到,它们在编码时就像解码一样容易。安全性不是编码步骤的意图。相反,编码的目的是将可能在用户名或密码中的非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.

这篇关于基础64编码的目的是什么,为什么它用于HTTP基本认证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆