Base64是加密还是编码算法? [英] Is Base64 an encryption or encoding algorithm?

查看:334
本文介绍了Base64是加密还是编码算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用基于Base64的加密算法,但是当我在线研究时,发现论坛指出它是一种编码算法.这让我感到困惑. :(

I have to use an encryption algorithm using Base64 but when I researched online I find forums state it is an encoding algorithm. This has me confused. :(

Base64是一种加密或编码算法吗?除了一个可以公开解密而另一个需要密钥的事实之外,我们如何区分这两个?

Is Base64 an encryption or encoding algorithm? How do we differentiate between the two except for the fact that one is publicly decipherable while the other needs a key for that?

推荐答案

这是一种编码算法(因此称为"Base64编码"),允许人们在ASCII友好环境中移动数据(即,没有控制字符或任何不可打印的内容) .它应该可以为您提供XML和JSON等的良好可移植性.

It's an encoding algorithm (hence "Base64 encoding") to allow people to move data in an ASCII friendly environment (i.e. no control characters or anything non-printable). It should give you good portability with XML and JSON etc.

编码是众所周知的,该算法很简单并且没有算法的可变性"或密钥等概念,因此不被视为加密".

The encoding is entirely well known, the algorithm is simple and as it has not "mutability" of the algorithm or concept of keys etc. it is not considered as "encryption".

总而言之,任何人都可以使用Base64解码您的内容,因此它不是加密的.至少没有用做加密.它可能会使四岁的孩子陷入困境,就是这样.

In summary, anybody can Base64 decode your content, so it's not encryption. At least not useful as encryption. It may keep a four year old stumped, but that's it.

这篇关于Base64是加密还是编码算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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