Thanks for your reply, 
To be precise I have written an equivalent function in .js file. Which I 
can call from C++ using V8. But I don't know how to include external JS file
See the below code snippet

//include("http://cryptojs.altervista.org/api/functions_cryptography.js";);
function AESEncrypt (PLAINTEXT, KEY, IV)
{
    
    var Crypt = new Crypt();  // constructor  
      
    /*** encrypt */  
    var ciphertext = Crypt.AES.encrypt(PLAINTEXT, KEY);  
    // H3fAh9bppeg=xuHy8woEtOfYYI18tLM76A==BKUvKCztSNl8  
      
    /*** decrypt */  
   var plaintext  = Crypt.AES.decrypt(ciphertext, KEY);  
   
    return ciphertext;
}
    
AESEncrypt(param1,param2);






On Wednesday, 20 April 2016 11:56:04 UTC+5, Jochen Eisinger wrote:
>
> Hey,
>
> it's not clear from your question what you're asking.
>
> The snippet is actually an HTML snippet, so I'd expect that pasting it 
> into an HTML file an opening in a browser does what you expect it to do?
>
> It doesn't look, however, related to V8 development. Please reach out to 
> the authors / maintainers of the crypto library for how to use it.
>
> best
> -jochen
>
> On Wed, Apr 20, 2016 at 6:52 AM <[email protected] <javascript:>> 
> wrote:
>
>> I need to execute following script which uses crypto-js library in V8. 
>> How should I write my js file.
>>
>> <script type="text/javascript" src="
>> http://cryptojs.altervista.org/api/functions_cryptography.js";></script>  
>> <script type="text/javascript">  
>>   
>> var Crypt = new Crypt();  // constructor  
>>   
>> /*** encrypt */  
>> var ciphertext = Crypt.AES.encrypt("plaintext", "Secret Passphrase");  
>> // H3fAh9bppeg=xuHy8woEtOfYYI18tLM76A==BKUvKCztSNl8  
>>   
>> /*** decrypt */  
>> var plaintext  = Crypt.AES.decrypt(ciphertext, "Secret Passphrase");  
>>   
>> </script>  
>>
>> -- 
>> -- 
>> v8-dev mailing list
>> [email protected] <javascript:>
>> http://groups.google.com/group/v8-dev
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "v8-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to