如何将文本转换为字符串数组,并进一步使其成为固定长度(16)字符数组 [英] How to convert a text into string array and further making it a fixed length(16) char array
本文介绍了如何将文本转换为字符串数组,并进一步使其成为固定长度(16)字符数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用AES加密给定文本,
文本是
喜悦跳跃喜悦跳过欢乐舞蹈
简洁生活中的快乐生活
简短生活中的快乐庆祝
快乐的生活瞬间生活
我需要将它作为单个字符串,将它们存储在char数组[16]并加密。
任何人都可以建议怎么做?
Hi, I'm trying to encrypt a a given text using AES,
the text is
joy leap joy skip joy dance
joy in brevity of life lives
joy in brevity life celebration
joy in a moment pace lives
I need to make this a single string, store them in a char array[16] and encrypt.
Can anyone suggest how to do it?
推荐答案
你不能。
你显示的文字包含112个字符:你不能适合16个字符而不丢弃信息 - 这会使解密变得无用!
You can't.
The text you show contains 112 characters: you cannot fit that into 16 characters without throwing away information - which would render the decryption useless!
这篇关于如何将文本转换为字符串数组,并进一步使其成为固定长度(16)字符数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文