Base64 的自定义映射表
我需要使用 Base 64 来加密一些数据。 但是,虽然每个人都可以解码它,但对其进行编码有意义吗?
所以我需要使用自定义映射表来编码insted of "ABCD......789+/"
我在php.net找到了一个函数 - http://www.php.net/manual/en/ function.base64-encode.php#78765
它可以做我需要的事情 但我不知道如何解码加密数据。
i need to use base 64 to encrypt some data.
but while everyone can decode it, does it make sense to encode it?
so i need to use custom maping table to encode insted of "ABCD......789+/"
i found a function at php.net -
http://www.php.net/manual/en/function.base64-encode.php#78765
it can do what i need
but i don't know how to decode the encrypted data.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Base64 加密确实不是为了安全。您想使用 mcrypt 或类似的方法。 Base64 专门用于以安全且可以被多个相关方理解的方式传输数据。
但是,您可以按照以下方式撤销该海报的方法:
如果您查看他的评论,您会发现他交换了“s”和 9(实际上,他的数组有两个“S”,但我认为第二个是拼写错误)。所以这应该有效:
base64 encryption really isn't for security. You want to use mcrypt or similar for that. base64 is specifically for transferring data in a way that is safe and can be understood by multiple interested parties.
But, here is how you'd go about undoing that poster's method:
If you look at his comments, he's switched 's' and 9 (actually, his array has two 'S', but I think the second was a typo). So this should work: