public void sendRatchetUpdateMessage ( OmemoDevice recipient ) throws SmackException . NotLoggedInException , CorruptedOmemoKeyException , InterruptedException , SmackException . NoResponseException , NoSuchAlgorithmException , SmackException . NotConnectedException , CryptoFailedException , CannotEstablishOmemoSessionException { synchronized ( LOCK ) { Message message = new Message ( ) ; message . setFrom ( getOwnJid ( ) ) ; message . setTo ( recipient . getJid ( ) ) ; OmemoElement element = getOmemoService ( ) . createRatchetUpdateElement ( new LoggedInOmemoManager ( this ) , recipient ) ; message . addExtension ( element ) ; // Set MAM Storage hint StoreHint . set ( message ) ; connection ( ) . sendStanza ( message ) ; } }
Send a ratchet update message . This can be used to advance the ratchet of a session in order to maintain forward secrecy .