public class Util extends Object
Modifier and Type | Method and Description |
---|---|
static void |
genKey(int[] key,
RandomSubset rs)
Generate a random LC4 key.
|
static void |
genNonce(int[] nonce,
Random prng)
Generate a random LC4 nonce.
|
static void |
genPlaintext(int[] pt,
DigramPicker dp)
Generate a random plaintext using the given digram frequencies.
|
static String |
intsToLetters(int[] x)
Convert the given integer array to a string.
|
static char |
intToLetter(int x)
Convert the given integer to a letter.
|
static int[] |
lettersToInts(String s)
Convert the given string to an integer array.
|
static int |
letterToInt(char c)
Convert the given letter to an integer.
|
public static int letterToInt(char c)
public static char intToLetter(int x)
public static int[] lettersToInts(String s)
public static String intsToLetters(int[] x)
public static void genKey(int[] key, RandomSubset rs)
public static void genNonce(int[] nonce, Random prng)
public static void genPlaintext(int[] pt, DigramPicker dp)
Copyright © 2017 by Alan Kaminsky. All rights reserved. Send comments to ark@cs.rit.edu.