|
Bouncy Castle Cryptography Library 1.82 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.util.GF16
| Constructor Summary | |
GF16()
|
|
| Method Summary | |
static void |
decode(byte[] input,
byte[] output,
int outputLen)
Decodes an encoded byte array. |
static void |
decode(byte[] input,
int inOff,
byte[] output,
int outOff,
int outputLen)
|
static void |
encode(byte[] input,
byte[] output,
int inputLen)
Encodes an array of 4-bit values into a byte array. |
static void |
encode(byte[] input,
byte[] output,
int outOff,
int inputLen)
|
static byte |
innerProduct(byte[] a,
int aOff,
byte[] b,
int bOff,
int rank)
|
static byte |
inv(byte a)
Computes the multiplicative inverse in GF(16) for a GF(16) element. |
static byte |
mul(byte a,
byte b)
GF(16) multiplication mod x^4 + x + 1. |
static int |
mul(int a,
int b)
GF(16) multiplication mod x^4 + x + 1. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GF16()
| Method Detail |
public static byte mul(byte a,
byte b)
This method multiplies two elements in GF(16) (represented as integers 0–15) using carryless multiplication followed by reduction modulo x^4 + x + 1. Please ensure a <= 0x0F and b <= 0x0F
a - an element in GF(16) (only the lower 4 bits are used)b - an element in GF(16) (only the lower 4 bits are used)
public static int mul(int a,
int b)
This method multiplies two elements in GF(16) (represented as integers 0–15) using carryless multiplication followed by reduction modulo x^4 + x + 1. Please ensure a <= 0x0F and b <= 0x0F
a - an element in GF(16) (only the lower 4 bits are used)b - an element in GF(16) (only the lower 4 bits are used)
public static byte inv(byte a)
public static void decode(byte[] input,
byte[] output,
int outputLen)
input - the input byte array (each byte holds two 4-bit values)output - the output array that will hold the decoded nibbles (one per byte)outputLen - the total number of nibbles to decode
public static void decode(byte[] input,
int inOff,
byte[] output,
int outOff,
int outputLen)
public static void encode(byte[] input,
byte[] output,
int inputLen)
input - the input array of 4-bit values (stored as bytes, only lower 4 bits used)output - the output byte array that will hold the encoded bytesinputLen - the number of nibbles in the input array
public static void encode(byte[] input,
byte[] output,
int outOff,
int inputLen)
public static byte innerProduct(byte[] a,
int aOff,
byte[] b,
int bOff,
int rank)
|
Bouncy Castle Cryptography Library 1.82 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||