Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (31 sloc) 1.196 kb
<!doctype html>
<html lang="en">
<meta charset="utf-8" />
<title>Test OTR</title>
var start = (new Date()).getTime();
<!-- Load dependencies -->
<script src="../build/dep/seedrandom.js"></script>
<script src="../build/dep/bigint.js"></script>
<script src="../build/dep/crypto.js"></script>
<!-- Load otr.js or otr.min.js -->
<script src="../build/otr.js"></script>
<!-- Ready to go! -->
document.write('loading scripts / seeding random took <strong>' + ((new Date()).getTime() - start) + 'ms</strong>');
var ui = function (msg) { console.log(msg); };
var userA = new OTR(null, ui, function (msg) {
document.write('<br />generating OTR object took <strong>' + ((new Date()).getTime() - start) + 'ms</strong>');
var userB = new OTR(null, ui, userA.receiveMsg);
start = (new Date()).getTime();
document.write('<br />ake took <strong>' + ((new Date()).getTime() - start) + 'ms</strong>');
document.write('<br />message state is ' + (userA.msgstate ? 'encrypted' : 'plaintext') + '</strong>');
Jump to Line
Something went wrong with that request. Please try again.