Add serialization helpers for IdentityKeyPair.

This commit is contained in:
Moxie Marlinspike
2014-04-28 12:10:24 -07:00
parent 931605a1c4
commit 2a65257182
4 changed files with 450 additions and 6 deletions

View File

@@ -75,9 +75,9 @@ public class TextSecureSessionStore implements SessionStore {
@Override
public void store(long recipientId, int deviceId, SessionRecord record) {
try {
MasterCipher masterCipher = new MasterCipher(masterSecret);
RandomAccessFile sessionFile = new RandomAccessFile(getSessionFile(recipientId, deviceId), "rw");
FileChannel out = sessionFile.getChannel();
MasterCipher masterCipher = new MasterCipher(masterSecret);
RandomAccessFile sessionFile = new RandomAccessFile(getSessionFile(recipientId, deviceId), "rw");
FileChannel out = sessionFile.getChannel();
out.position(0);
writeInteger(CURRENT_VERSION, out);