纯粹的加密和解密
我有一个长度为 64 个字符的字符串,我必须将其转换为长度为 16 个字符的字符串。您能否指导我加密方法,将 64 个字符的字符串加密为 16 个字符的字符串,并且当我解密 16 个字符的字符串时,我需要取回 64 个字符的字符串。
I have a string of length 64 characters, I have to convert that into string of length 16 characters. Can you please guide me through the encryption method which encrypts the string of 64 characters into string of 16 characters and also when I decrypt the 16 characters string, I need to get the 64 characters string back.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能。
通常,您无法将 64 个字节(或字符)的信息放入 16 个字节(或字符)而不丢失一些数据。
您可以尝试对其进行压缩,如果幸运的话,数据会压缩到 16 个字节或更少,但这取决于输入,并且肯定不适用于所有输入。
You can't.
Generally, you can't put 64 bytes (or characters) of information into 16 bytes (or characters) without losing some data.
You can try to compress it and if you're lucky the data compresses to 16 bytes or less, but that depends on the input and will definitely not work on all input.