Node:ARCFour, Next:, Previous:The PRNGFactory Class, Up:Random Numbers



ARCFour

The ARCFour keystream is implemented in the class ARCFour, which defines the following additional constant:

java.lang.String ARCFOUR_KEY_MATERIAL Variable
A property name in the attributes map used to initialize instances of ARCFour. The value mapped must be a byte array of the secret key, which can be up to 256 bytes long.

Also note that using the ARCFour PRNG as a stream cipher is as simple as:

     IRandom arcfour; // initialized elsewhere.
     byte in, out;
     
     out = in ^ arcfour.next();