Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
marcus.hardt
pluto
Commits
a6f77a1f
Commit
a6f77a1f
authored
Oct 15, 2014
by
Daniel Hofmann
Browse files
JS interop
parent
ff7c0544
Changes
1
Hide whitespace changes
Inline
Side-by-side
interop/js/interop.html
0 → 100644
View file @
a6f77a1f
<!DOCTYPE html>
<html
lang=
"de"
>
<head>
<meta
charset=
"utf-8"
>
<title>
AES (in CBC mode) language interop tester
</title>
<!-- notes:
- host locally!
--!>
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js"></script>
</head>
<body>
<p>check console for now!</p>
</body>
<script>
"use strict";
var plaintext = 'Hello';
var key = '0000000000000000';
var iv = '0000000000000000';
var opts = { iv: iv,
keySize: 128 / 8,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7 };
var enc = CryptoJS.AES.encrypt(plaintext, key, opts);
console.log({key: key, iv: iv, plaintext: plaintext});
console.log(enc.toString())
</script>
</html>
<!-- vim: set tabstop=4 shiftwidth=4 expandtab: --!>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment