public final class Galois extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
(专用程序包) static byte[] |
EXP_TABLE
Inverse of the logarithm table.
|
static int |
FIELD_SIZE
The number of elements in the field.
|
static int |
GENERATING_POLYNOMIAL
The polynomial used to generate the logarithm table.
|
static short[] |
LOG_TABLE
Mapping from members of the Galois Field to their
integer logarithms.
|
static byte[][] |
MULTIPLICATION_TABLE
A multiplication table for the Galois field.
|
| 构造器和说明 |
|---|
Galois() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte |
add(byte a,
byte b)
Adds two elements of the field.
|
static Integer[] |
allPossiblePolynomials()
Returns a list of all polynomials that can be used to generate
the field.
|
static byte |
divide(byte a,
byte b)
Inverse of multiplication.
|
static byte |
exp(byte a,
int n)
Computes a**n.
|
static byte[] |
generateExpTable(short[] logTable)
Generates the inverse log table.
|
static short[] |
generateLogTable(int polynomial)
Generates a logarithm table given a starting polynomial.
|
static byte[][] |
generateMultiplicationTable()
Generates a multiplication table as an array of byte arrays.
|
static byte |
multiply(byte a,
byte b)
Multiplies two elements of the field.
|
static byte |
subtract(byte a,
byte b)
Inverse of addition.
|
public static final int FIELD_SIZE
public static final int GENERATING_POLYNOMIAL
public static final short[] LOG_TABLE
static final byte[] EXP_TABLE
public static byte[][] MULTIPLICATION_TABLE
public static byte add(byte a,
byte b)
public static byte subtract(byte a,
byte b)
public static byte multiply(byte a,
byte b)
public static byte divide(byte a,
byte b)
public static byte exp(byte a,
int n)
a - A member of the field.n - A plain-old integer.public static short[] generateLogTable(int polynomial)
public static byte[] generateExpTable(short[] logTable)
public static byte[][] generateMultiplicationTable()
public static Integer[] allPossiblePolynomials()
Copyright © 2022. All rights reserved.