nl_tokens: * Encode a message separated from encode () to help testing
pl_tokens: function ( senderPriv , recipientPub , msg , iv , salt ) { // Errors if ( ! senderPriv || ! recipientPub || ! msg || ! iv || ! salt ) throw new Error ( 'Missing argument !' ) ; // Processing let keyPair = createKeyPairFromPrivateKeyString ( senderPriv ) ; let pk = convert . hexToUint8 ( recipientPub ) ; let encKey = deriveSharedKey ( keyPair , pk , salt ) ; let encIv = { iv : ua2words ( iv , 16 ) } ; let encrypted = CryptoJS . AES . encrypt ( CryptoJS . enc . Hex . parse ( convert . utf8ToHex ( <mask> ) ) , encKey , encIv ) ; // Result let result = convert . uint8ToHex ( salt ) + convert . uint8ToHex ( iv ) + CryptoJS . enc . Hex . stringify ( encrypted . ciphertext ) ; return result ; }