本文整理汇总了Java中org.bouncycastle.util.Arrays.clone方法的典型用法代码示例。如果您正苦于以下问题:Java Arrays.clone方法的具体用法?Java Arrays.clone怎么用?Java Arrays.clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bouncycastle.util.Arrays
的用法示例。
在下文中一共展示了Arrays.clone方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: engineGetEncoded
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
protected byte[] engineGetEncoded(
String format)
throws IOException
{
if (isASN1FormatString(format))
{
return new DEROctetString(engineGetEncoded("RAW")).getEncoded();
}
if (format.equals("RAW"))
{
return Arrays.clone(iv);
}
return null;
}
示例2: getCoeffSingular
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
/**
* @return the coeffSingular
*/
public short[][] getCoeffSingular()
{
short[][] copy = new short[coeffsingular.length][];
for (int i = 0; i != coeffsingular.length; i++)
{
copy[i] = Arrays.clone(coeffsingular[i]);
}
return copy;
}
示例3: clone
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
private static byte[][] clone(byte[][] data)
{
if (data == null)
{
return null;
}
byte[][] copy = new byte[data.length][];
for (int i = 0; i != data.length; i++)
{
copy[i] = Arrays.clone(data[i]);
}
return copy;
}
示例4: init
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
/**
* initialise an GOST28147 cipher.
*
* @param forEncryption whether or not we are for encryption.
* @param params the parameters required to set up the cipher.
* @exception IllegalArgumentException if the params argument is
* inappropriate.
*/
public void init(
boolean forEncryption,
CipherParameters params)
{
if (params instanceof ParametersWithSBox)
{
ParametersWithSBox param = (ParametersWithSBox)params;
//
// Set the S-Box
//
byte[] sBox = param.getSBox();
if (sBox.length != Sbox_Default.length)
{
throw new IllegalArgumentException("invalid S-box passed to GOST28147 init");
}
this.S = Arrays.clone(sBox);
//
// set key if there is one
//
if (param.getParameters() != null)
{
workingKey = generateWorkingKey(forEncryption,
((KeyParameter)param.getParameters()).getKey());
}
}
else if (params instanceof KeyParameter)
{
workingKey = generateWorkingKey(forEncryption,
((KeyParameter)params).getKey());
}
else if (params != null)
{
throw new IllegalArgumentException("invalid parameter passed to GOST28147 init - " + params.getClass().getName());
}
}
示例5: multiply
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
private static void multiply(byte[] block, byte[] val)
{
byte[] tmp = Arrays.clone(block);
byte[] c = new byte[16];
for (int i = 0; i < 16; ++i)
{
byte bits = val[i];
for (int j = 7; j >= 0; --j)
{
if ((bits & (1 << j)) != 0)
{
xor(c, tmp);
}
boolean lsb = (tmp[15] & 1) != 0;
shiftRight(tmp);
if (lsb)
{
// R = new byte[]{ 0xe1, ... };
// xor(v, R);
tmp[0] ^= (byte)0xe1;
}
}
}
System.arraycopy(c, 0, block, 0, 16);
}
示例6: getMinTreehash
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public int[] getMinTreehash()
{
return Arrays.clone(minTreehash);
}
示例7: getOctets
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public byte[] getOctets()
{
return Arrays.clone(string);
}
示例8: getMac
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public byte[] getMac()
{
return Arrays.clone(mac);
}
示例9: getSubjectKeyIdentifier
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public byte[] getSubjectKeyIdentifier()
{
return Arrays.clone(subjectKeyId);
}
示例10: getCoeffs
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public BigInteger[] getCoeffs()
{
return Arrays.clone(coeffs);
}
示例11: engineInit
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
protected void engineInit(
byte[] params)
throws IOException
{
this.iv = Arrays.clone(params);
}
示例12: getCurrentSeeds
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public byte[][] getCurrentSeeds()
{
return Arrays.clone(currentSeeds);
}
示例13: getCurrentAuthPaths
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public byte[][][] getCurrentAuthPaths()
{
return Arrays.clone(currentAuthPaths);
}
示例14: getC
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public byte[][] getC() {
return Arrays.clone(c);
}
开发者ID:republique-et-canton-de-geneve,项目名称:chvote-protocol-poc,代码行数:4,代码来源:ObliviousTransferResponse.java
示例15: getRoot
import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
/**
* returns the finished root value
*
* @return the finished root value
*/
public byte[] getRoot()
{
return Arrays.clone(root);
}