function testAlgorithmParameterMissingHash(token) {
  var algorithm = {
    name: 'RSASSA-PKCS1-v1_5',
    modulusLength: 512,
    // Equivalent to 65537
    publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
  };
  token.subtleCrypto.generateKey(algorithm, false, ['sign'])
      .then(function(keyPair) { fail('generateKey was expected to fail'); },
            callbackPass(function(error) {
    assertEq(
        new Error('Error: A required parameter was missing our out-of-range'),
        error);
  }));
}
// Call generate key with invalid algorithm parameter, missing hash.
Call generate key with invalid algorithm parameter, missing hash.
Call generate key with invalid algorithm parameter missing hash .
function testAlgorithmParameterMissingHash(token) {
  var algorithm = {
    name: 'RSASSA-PKCS1-v1_5',
    modulusLength: 512,
    publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
  };
  token.subtleCrypto.generateKey(algorithm, false, ['sign'])
      .then(function(keyPair) { fail('generateKey was expected to fail'); },
            callbackPass(function(error) {
    assertEq(
        new Error('Error: A required parameter was missing our out-of-range'),
        error);
  }));
}
function testAlgorithmParameterMissingHash ( token ) { var algorithm = { name : 'RSASSA-PKCS1-v1_5' , modulusLength : 512 , publicExponent : new Uint8Array ( [ 0x01 , 0x00 , 0x01 ] ) , } ; token . subtleCrypto . generateKey ( algorithm , false , [ 'sign' ] ) . then ( function ( keyPair ) { fail ( 'generateKey was expected to fail' ) ; } , callbackPass ( function ( error ) { assertEq ( new Error ( 'Error: A required parameter was missing our out-of-range' ) , error ) ; } ) ) ; }
Call generate key with invalid algorithm parameter, missing hash.
Call generate key with invalid algorithm parameter missing hash .
// Equivalent to 65537