File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
app/src/main/java/org/vonderheidt/hips/utils Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -9,24 +9,24 @@ object UTF8 {
99 /* *
1010 * Function to convert a string into its binary representation using UTF-8 encoding.
1111 *
12- * @param secretMessage Secret message.
13- * @return Binary representation of the secret message.
12+ * @param preparedSecretMessage A prepared secret message.
13+ * @return The binary representation of the prepared secret message.
1414 */
15- fun encode (secretMessage : String ): ByteArray {
16- val plainBits = secretMessage .toByteArray(charset = Charsets .UTF_8 )
15+ fun encode (preparedSecretMessage : String ): ByteArray {
16+ val plainBits = (preparedSecretMessage) .toByteArray(charset = Charsets .UTF_8 )
1717
1818 return plainBits
1919 }
2020
2121 /* *
2222 * Function to convert the binary representation of a string back to the string using UTF-8 decoding.
2323 *
24- * @param plainBits Binary representation of the secret message.
25- * @return Secret message.
24+ * @param plainBits The binary representation of a prepared secret message.
25+ * @return The prepared secret message.
2626 */
2727 fun decode (plainBits : ByteArray ): String {
28- val secretMessage = String (bytes = plainBits, charset = Charsets .UTF_8 )
28+ val preparedSecretMessage = String (bytes = plainBits, charset = Charsets .UTF_8 )
2929
30- return secretMessage
30+ return preparedSecretMessage
3131 }
3232}
You can’t perform that action at this time.
0 commit comments