Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 1.33 KB

SecureRandom.readme.md

File metadata and controls

63 lines (43 loc) · 1.33 KB

SecureRandom

                                                        Titaniumcore Project

Atsushi Oka [ http://oka.nu/ ] Jan 8,2009

This is a class which implements arcfour pseudo random generator.

Link

<script src="./cipher/SecureRandom.js"></script>

Import

var SecureRandom = __import( this,"titaniumcore.crypto.SecureRandom" );

Example

var random = new SecureRandom();
var buf = new Array(16);
random.nextBytes(buf);

Method Summary

  • SecureRandom.prototype.nextBytes(buf);

    Returns a byte array that initialized by randomly generated byte values.

ACKNOWLEDGMENT

Following files were originally written by Tom Wu :

  • SecureRandom.js
  • BigInteger.init1.js
  • BigInteger.init2.js
  • BigInteger.init3.js
  • RSA.init1.js
  • RSA.init2.js
  • RSA.init3.js

Copyright (c) 2005 Tom Wu All Rights Reserved.
http://www-cs-students.stanford.edu/~tjw/jsbn/

See "LICENSE" for details.
http://www-cs-students.stanford.edu/~tjw/jsbn/LICENSE

Additionally Atushi Oka has done following works :

  • Packaged all classes
  • Added asynchronous execution feauture
  • Fixed bugs
  • Revised ambiguous class interface on constructors/methods.
  • Adapted to Flash ActionScript ( "add" is a reserved identifier in ActionScript. etc.)

// vim:ts=8:expandtab: