http://git.chat98.i2p/chat98/chat98/blame/commit/358aa6038cb79ae451a8d6d1fae44ba32ac77741/src/main/kotlin/i2p/chat98/service/crypto/CryptoService.kt
. * / fun encryptIrcMessage ( ircMessage : IrcMessage , recipient : Buddy ) : IrcEncryptedMessage { val throwawayPrivateKey = genX25519PrivateKey ( ) val sharedSecret = ByteArray ( 32 ) throwawayPrivateKey . generateSecret ( recipient . mainKey , sharedSecret , 0 ) val ircMessageBytes = ircMessage . serialize ( ) // Ideally XChaCha20-Poly1305 would be preferred to further prevent nonce re-use, however since a throwaway key is used here it's not too big of an issue, since we will never...