/*(c) 2006 - 2008 AllenPort Co. All Rights Reserved.
All versions of this code, including the source and executable versions, 
constitute the intellectual property of AllenPort Co., which expressly reserves 
any and all U.S. and foreign rights and benefits to the code under copyright, 
trade secret and any other intellectual property law or international treaty 
whatsoever. Use of the code is subject to the terms and conditions of a separate 
written license agreement, and the code shall not be reproduced, modified, distributed 
or otherwise used in any form or manner whatsoever without obtaining the prior written 
permission of AllenPort Co. Any unauthorized reproduction or distribution of the code, 
or any portion of it, may result in civil and criminal penalties and be prosecuted 
to the fullest extent of the law.*/
// password should be string
// function returns string
function make_sym_key(password)
{
  var salt       = String.fromCharCode(0x12, 0x34, 0x56, 0x78);

  var iterations = 32;
  var bytes      = 32; // Key Length in bytes (32*8 ~ 256 bit)

  var generator = new PBKDF2(password, salt, iterations, bytes);


  var status_callback = function(percent_done) {};
  var result_callback = function(key) {};

  generator.deriveKey(status_callback, result_callback);

  return hexToString(generator.get_key());
}
