function str2array(str) {
var buf = new Uint8Array(str.length);
for (var i = 0; i < str.length; i++) {
buf[i] = str.charCodeAt(i);
}
return buf;
}
function array2str(bytes) {
return String.fromCharCode.apply(null, bytes);
}
key = str2array('0123456789012345');
var n = 1; // Math.floor(Math.random() * 10000);
var aesCtr = new aesjs.ModeOfOperation.ctr(key, new aesjs.Counter(n));
var msg = '0123456789'
var encrypted = aesCtr.encrypt(str2array(msg));
AES CTR Mode
Python
JS on browser
aes-js