<!-- Utilities for manipulating ABVs -->
<script src="util.js"></script>
<!-- A simple wrapper around IndexedDB -->
<script src="simpledb.js"></script>
<!-- Test vectors drawn from the literature -->
<script src="./test-vectors.js"></script>
<!-- General testing framework -->
<script src="./test-array.js"></script>
<script>/* <![CDATA[*/ "use strict";
// -----------------------------------------------------------------------------
TestArray.addTest( "Structured Cloning: AES-CTR",
function() { var that = this; var data = crypto.getRandomValues(new Uint8Array(128)); var iv = crypto.getRandomValues(new Uint8Array(16)); var alg = {name: "AES-CTR", length: 128, iv};
var counter = new Uint8Array(16); var algEncrypt = {name: "AES-CTR", length: 128, counter};
// -----------------------------------------------------------------------------
TestArray.addTest( "Structured Cloning: AES-CBC",
function() { var that = this; var data = crypto.getRandomValues(new Uint8Array(128)); var iv = crypto.getRandomValues(new Uint8Array(16)); var alg = {name: "AES-CBC", length: 128, iv};
// -----------------------------------------------------------------------------
TestArray.addTest( "Structured Cloning: AES-GCM",
function() { var that = this; var data = crypto.getRandomValues(new Uint8Array(128)); var iv = crypto.getRandomValues(new Uint8Array(16)); var alg = {name: "AES-GCM", length: 128, iv};
// -----------------------------------------------------------------------------
TestArray.addTest( "Structured Cloning: PBKDF2",
function() { var that = this; var key = new TextEncoder().encode("password");
// -----------------------------------------------------------------------------
TestArray.addTest( "Structured Cloning: HKDF",
function() { var that = this; var key = new TextEncoder().encode("password");
var alg = {
name: "HKDF",
hash: "SHA-256",
salt: new Uint8Array(),
info: new Uint8Array(),
};
// -----------------------------------------------------------------------------
TestArray.addTest( "Structured Cloning: RSA-OAEP",
function() { var that = this; var data = crypto.getRandomValues(new Uint8Array(128));
var alg = {
name: "RSA-OAEP",
hash: "SHA-256",
modulusLength: 2048,
publicExponent: new Uint8Array([1, 0, 1]),
};
// -----------------------------------------------------------------------------
TestArray.addTest( "Structured Cloning: RSASSA-PKCS1-v1_5",
function() { var that = this; var data = crypto.getRandomValues(new Uint8Array(128));
var alg = {
name: "RSASSA-PKCS1-v1_5",
hash: "SHA-256",
modulusLength: 2048,
publicExponent: new Uint8Array([1, 0, 1]),
};
// -----------------------------------------------------------------------------
TestArray.addTest( "Structured Cloning: RSA-PSS",
function() { var that = this; var data = crypto.getRandomValues(new Uint8Array(128));
var alg = {
name: "RSA-PSS",
hash: "SHA-256",
modulusLength: 2048,
publicExponent: new Uint8Array([1, 0, 1]),
saltLength: 20,
};
// -----------------------------------------------------------------------------
TestArray.addTest( "Structured Cloning: Ed25519",
function() { var that = this; var data = crypto.getRandomValues(new Uint8Array(128));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.