mirror of
				https://github.com/oxen-io/session-android.git
				synced 2025-10-25 01:11:17 +00:00 
			
		
		
		
	Rearrange decrypt API.
1) Change SessionBuilder to only establish sessions via KeyExchangeMessage and PreKeyBundles. 2) Change SessionCipher to decrypt either WhisperMessage or PreKeyWhisperMessage items, automatically building a session for the latter. 3) Change SessionCipher to tear down new sessions built with PreKeyWhisperMessages if the embedded WhsiperMessage fails to decrypt.
This commit is contained in:
		| @@ -281,6 +281,7 @@ public class SmsDatabase extends Database implements MmsSmsColumns { | ||||
|       else if (((IncomingKeyExchangeMessage)message).isInvalidVersion()) type |= Types.KEY_EXCHANGE_INVALID_VERSION_BIT; | ||||
|       else if (((IncomingKeyExchangeMessage)message).isIdentityUpdate()) type |= Types.KEY_EXCHANGE_IDENTITY_UPDATE_BIT; | ||||
|       else if (((IncomingKeyExchangeMessage)message).isLegacyVersion())  type |= Types.ENCRYPTION_REMOTE_LEGACY_BIT; | ||||
|       else if (((IncomingKeyExchangeMessage)message).isDuplicate())      type |= Types.ENCRYPTION_REMOTE_DUPLICATE_BIT; | ||||
|       else if (((IncomingKeyExchangeMessage)message).isPreKeyBundle())   type |= Types.KEY_EXCHANGE_BUNDLE_BIT; | ||||
|     } else if (message.isSecureMessage()) { | ||||
|       type |= Types.SECURE_MESSAGE_BIT; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Moxie Marlinspike
					Moxie Marlinspike