public class NFold extends Object
Constructor and Description |
---|
NFold() |
Modifier and Type | Method and Description |
---|---|
protected static int |
getLcm(int n1,
int n2)
For 2 numbers, return the least-common multiple.
|
static byte[] |
nFold(int n,
byte[] data)
N-fold the data n times.
|
protected static byte[] |
sum(byte[] n1,
byte[] n2,
int len)
Perform one's complement addition (addition with end-around carry).
|
public NFold()
public static byte[] nFold(int n, byte[] data)
n
- The number of times to n-fold the data.data
- The data to n-fold.protected static int getLcm(int n1, int n2)
n1
- The first number.n2
- The second number.protected static byte[] sum(byte[] n1, byte[] n2, int len)
n1
- The first number.n2
- The second number.len
- The length of the byte arrays to sum.Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.