 <p><code>message.getBytes()</code> in your case is trying to convert Chinese Unicode characters to bytes using the default character set on your computer. If its a western charset, its going to be wrong.</p> <p>Notice that <code>String.getBytes()</code> has another form with <code>String.getBytes(String)</code> where the string is the name of a character encoding that is used to convert the chars of the string to bytes.</p> <p>The <code>char</code> type will hold Unicode. The <code>byte</code> type only holds raw bits in groups of 8.</p> <p>So, to convert a Unicode string to bytes encoded as UTF-16 you would use this code:</p> <pre><code>String message =" 汉语"; byte[] utf16Bytes = message.getBytes("utf-16"); </code></pre> <p>Substitute the name of any encoding that you want to use.</p> <p>Similarly <code>new String(String, byte[])</code> constructor can take an array of bytes encoded in some fashion and, given the String, can convert those bytes to Unicode characters.</p> <p>For example: If you want to convert those bytes, which were encoded as utf-16 above, back to a <code>String</code> (which has Unicode <code>char</code>s in it):</p> <pre><code>String newMessage = new String(utf16Bytes, "utf-16"); </code></pre> <p>Since I don't know what you mean by "binary code" above, I can't go much farther. As I see it, the Unicode chars have a binary code inside them that represents the characters one-by-one. Also the byte array has a binary code in it that represents the characters with a many-bytes-to-one-character representation. If you want to encrypt the byte array somehow, use a standard, proven encryption method and proven, time-tested procedures to secure the contents.</p>