Back to project page CipherChat.
The source code is released under:
MIT License
If you think the Android project CipherChat listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.desperate.common.messages; /*from w w w.j av a2s .c o m*/ import java.io.UnsupportedEncodingException; import com.desperate.common.Message; import com.desperate.common.Utilities; /** * Contains a message ciphered with a session key. To be used after the Needham-Schroeder protocol was completed. * * @author SIRS-RAR * */ public class ChatMessage extends Message { private static final long serialVersionUID = 2281847078152149714L; /** Is actually a String, ciphered with a session key. */ public byte[] cipheredText; @Override public String getStringToHMAC() { try { return timestamp + new String(cipheredText, Utilities.charset); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } }