当前位置: 首页>>代码示例>>Java>>正文


Java Arrays.clone方法代码示例

本文整理汇总了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;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:17,代码来源:IvAlgorithmParameters.java

示例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;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:15,代码来源:BCRainbowPublicKey.java

示例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;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:16,代码来源:GMSSPrivateKeySpec.java

示例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());
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:46,代码来源:GOST28147Engine.java

示例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);
    }
 
开发者ID:Appdome,项目名称:ipack,代码行数:29,代码来源:GCMBlockCipher.java

示例6: getMinTreehash

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public int[] getMinTreehash()
{
    return Arrays.clone(minTreehash);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:GMSSPrivateKeySpec.java

示例7: getOctets

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public byte[] getOctets()
{
    return Arrays.clone(string);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:DERIA5String.java

示例8: getMac

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public byte[] getMac()
{
    return Arrays.clone(mac);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:CMSAuthenticatedData.java

示例9: getSubjectKeyIdentifier

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public byte[] getSubjectKeyIdentifier()
{
    return Arrays.clone(subjectKeyId);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:X509CertificateHolderSelector.java

示例10: getCoeffs

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public BigInteger[] getCoeffs()
{
    return Arrays.clone(coeffs);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:BigIntPolynomial.java

示例11: engineInit

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
protected void engineInit(
    byte[] params)
    throws IOException
{
    this.iv = Arrays.clone(params);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:7,代码来源:RC2.java

示例12: getCurrentSeeds

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public byte[][] getCurrentSeeds()
{
    return Arrays.clone(currentSeeds);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:GMSSPrivateKeyParameters.java

示例13: getCurrentAuthPaths

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public byte[][][] getCurrentAuthPaths()
{
    return Arrays.clone(currentAuthPaths);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:5,代码来源:GMSSPrivateKeyParameters.java

示例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);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:10,代码来源:GMSSRootCalc.java


注:本文中的org.bouncycastle.util.Arrays.clone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。