PHP中的Base64_encode()是否等于java.util.Base64? [英] Is Base64_encode() in PHP equal to java.util.Base64?

查看:741
本文介绍了PHP中的Base64_encode()是否等于java.util.Base64?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用php传递编码的字符串并将其传递给其他使用java.util.Base64进行编码和解码的系统. 我可以使用base64_encode($str)进行编码并将字符串传递给他们,以便在php和 我可以使用base62_decode($str)来解码从php中的java.util.Base64得到的内容吗? 还是有其他方法可以在php中编码和解码java.util.Base64字符串?

I want to use php to pass and get a encoded string to other system which are using java.util.Base64 to encode and decode. Can I use base64_encode($str) to encode and pass the string to them for decode in php and can i use base62_decode($str) to decode what I get from java.util.Base64 in php? Or is there other way to encode and decode java.util.Base64 string in php?

谢谢!

推荐答案

简短回答:.

Base64是标准.

长答案:

base64_encode的PHP文档参考

The PHP documentation for base64_encode references RFC 2045 which is the MIME base64 encoding.

Javadoc 告诉您Java支持不同类型的Base64,其中之一是MIME.基本类型也应该起作用.主要区别在于MIME类型要求任何行都不能超过76个字符.

The Javadoc tells that Java supports different types of Base64, one of which is MIME. The Basic type should also work. The main difference is that the MIME type requires that no line is longer than 76 characters.

这篇关于PHP中的Base64_encode()是否等于java.util.Base64?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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