Skip to main content
Skip table of contents

Using a Custom R Key Generator

You can configure SuperCHANNEL to automatically generate R Keys for perturbation when building your SXV4. SuperCHANNEL is supplied with an R Key generator that you can use, but you can also replace this with your own custom R Key generator if you prefer.

To create your own generator, you need to implement the following interface in Java:

JAVA
package str.database.rkey;

public interface RkeyGeneratorBuilder {
    public static interface RkeyGenerator{
        public double next();
    }

    public RkeyGenerator create(String seed);
}

For example:

JAVA
public class SimpleRkeyGenerator implements RkeyGeneratorBuilder {
    public RkeyGenerator create(final String seed) {
        final Random rand = new Random(Long.parseLong(seed));

        return new RkeyGenerator() {
            public double next() {
                return rand.nextInt(Integer.MAX_VALUE);
            }
        };
    }
}

Once you have implemented your generator:

  1. Compile it, and pack it into a .jar file.
  2. Copy the packed .jar files and all dependencies to the SuperCHANNEL drivers directory. If you installed to the default location, this will be C:\Program Files\STR\SuperCHANNEL\jar\drivers.
  3. Locate the SuperCHANNEL configuration file, config.txt, and open it in a text editor. If you chose the default installation options, this file will be located in C:\ProgramData\STR\SuperCHANNEL\bin
  4. Locate the line that defines the Java class path property (java.class.path=), and add the path to each of your .jar files at the end of the definition.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.