• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Pack类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.bouncycastle.crypto.util.Pack的典型用法代码示例。如果您正苦于以下问题:Java Pack类的具体用法?Java Pack怎么用?Java Pack使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Pack类属于org.bouncycastle.crypto.util包,在下文中一共展示了Pack类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: doFinal

import org.bouncycastle.crypto.util.Pack; //导入依赖的package包/类
public int doFinal(
    byte[]  out,
    int     outOff)
{
    finish();

    Pack.intToBigEndian(H1, out, outOff);
    Pack.intToBigEndian(H2, out, outOff + 4);
    Pack.intToBigEndian(H3, out, outOff + 8);
    Pack.intToBigEndian(H4, out, outOff + 12);
    Pack.intToBigEndian(H5, out, outOff + 16);
    Pack.intToBigEndian(H6, out, outOff + 20);
    Pack.intToBigEndian(H7, out, outOff + 24);
    Pack.intToBigEndian(H8, out, outOff + 28);

    reset();

    return DIGEST_LENGTH;
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:20,代码来源:SHA256Digest.java


示例2: doFinal

import org.bouncycastle.crypto.util.Pack; //导入依赖的package包/类
public int doFinal(
    byte[]  out,
    int     outOff)
{
    finish();

    Pack.intToBigEndian(H1, out, outOff);
    Pack.intToBigEndian(H2, out, outOff + 4);
    Pack.intToBigEndian(H3, out, outOff + 8);
    Pack.intToBigEndian(H4, out, outOff + 12);
    Pack.intToBigEndian(H5, out, outOff + 16);

    reset();

    return DIGEST_LENGTH;
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:17,代码来源:SHA1Digest.java


示例3: generateBytes

import org.bouncycastle.crypto.util.Pack; //导入依赖的package包/类
public int generateBytes(byte[] out, int outOff, int len)
    throws DataLengthException, IllegalArgumentException
{
    // TODO Create an ASN.1 class for this (RFC3278)
    // ECC-CMS-SharedInfo
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(new AlgorithmIdentifier(algorithm, DERNull.INSTANCE));
    v.add(new DERTaggedObject(true, 2, new DEROctetString(Pack.intToBigEndian(keySize))));

    try
    {
        kdf.init(new KDFParameters(z, new DERSequence(v).getEncoded(ASN1Encoding.DER)));
    }
    catch (IOException e)
    {
        throw new IllegalArgumentException("unable to initialise kdf: " + e.getMessage());
    }

    return kdf.generateBytes(out, outOff, len);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:22,代码来源:ECDHKEKGenerator.java


示例4: init

import org.bouncycastle.crypto.util.Pack; //导入依赖的package包/类
public void init(CipherParameters params)
    throws IllegalArgumentException
{
    if (!(params instanceof KeyParameter))
    {
        throw new IllegalArgumentException("'params' must be an instance of KeyParameter");
    }
    KeyParameter keyParameter = (KeyParameter)params;
    byte[] key = keyParameter.getKey();
    if (key.length != 16)
    {
        throw new IllegalArgumentException("'params' must be a 128-bit key");
    }

    this.k0 = Pack.littleEndianToLong(key, 0);
    this.k1 = Pack.littleEndianToLong(key, 8);

    reset();
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:20,代码来源:SipHash.java


示例5: doFinal

import org.bouncycastle.crypto.util.Pack; //导入依赖的package包/类
public int doFinal(
    byte[]  out,
    int     outOff)
{
    finish();

    Pack.longToBigEndian(H1, out, outOff);
    Pack.longToBigEndian(H2, out, outOff + 8);
    Pack.longToBigEndian(H3, out, outOff + 16);
    Pack.longToBigEndian(H4, out, outOff + 24);
    Pack.longToBigEndian(H5, out, outOff + 32);
    Pack.longToBigEndian(H6, out, outOff + 40);

    reset();

    return DIGEST_LENGTH;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:18,代码来源:SHA384Digest.java


示例6: doFinal

import org.bouncycastle.crypto.util.Pack; //导入依赖的package包/类
public int doFinal(
    byte[]  out,
    int     outOff)
{
    finish();

    Pack.longToBigEndian(H1, out, outOff);
    Pack.longToBigEndian(H2, out, outOff + 8);
    Pack.longToBigEndian(H3, out, outOff + 16);
    Pack.longToBigEndian(H4, out, outOff + 24);
    Pack.longToBigEndian(H5, out, outOff + 32);
    Pack.longToBigEndian(H6, out, outOff + 40);
    Pack.longToBigEndian(H7, out, outOff + 48);
    Pack.longToBigEndian(H8, out, outOff + 56);

    reset();

    return DIGEST_LENGTH;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:20,代码来源:SHA512Digest.java


示例7: doFinal

import org.bouncycastle.crypto.util.Pack; //导入依赖的package包/类
public int doFinal(
    byte[]  out,
    int     outOff)
{
    finish();

    Pack.intToBigEndian(H1, out, outOff);
    Pack.intToBigEndian(H2, out, outOff + 4);
    Pack.intToBigEndian(H3, out, outOff + 8);
    Pack.intToBigEndian(H4, out, outOff + 12);
    Pack.intToBigEndian(H5, out, outOff + 16);
    Pack.intToBigEndian(H6, out, outOff + 20);
    Pack.intToBigEndian(H7, out, outOff + 24);

    reset();

    return DIGEST_LENGTH;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:19,代码来源:SHA224Digest.java


示例8: multiplyH

import org.bouncycastle.crypto.util.Pack; //导入依赖的package包/类
public void multiplyH(byte[] x)
    {
//      assert x.Length == 16;

        int[] z = new int[4];
        for (int i = 15; i >= 0; --i)
        {
//            GCMUtil.xor(z, M[i][x[i] & 0xff]);
            int[] m = M[i][x[i] & 0xff];
            z[0] ^= m[0];
            z[1] ^= m[1];
            z[2] ^= m[2];
            z[3] ^= m[3];
        }

        Pack.intToBigEndian(z, x, 0);
    }
 
开发者ID:Appdome,项目名称:ipack,代码行数:18,代码来源:Tables64kGCMMultiplier.java


示例9: multiplyH

import org.bouncycastle.crypto.util.Pack; //导入依赖的package包/类
public void multiplyH(byte[] x)
    {
//      assert x.Length == 16;

        int[] z = new int[4];
        for (int i = 15; i >= 0; --i)
        {
//            GCMUtil.xor(z, M[i + i][x[i] & 0x0f]);
            int[] m = M[i + i][x[i] & 0x0f];
            z[0] ^= m[0];
            z[1] ^= m[1];
            z[2] ^= m[2];
            z[3] ^= m[3];
//            GCMUtil.xor(z, M[i + i + 1][(x[i] & 0xf0) >>> 4]);
            m = M[i + i + 1][(x[i] & 0xf0) >>> 4];
            z[0] ^= m[0];
            z[1] ^= m[1];
            z[2] ^= m[2];
            z[3] ^= m[3];
        }

        Pack.intToBigEndian(z, x, 0);
    }
 
开发者ID:Appdome,项目名称:ipack,代码行数:24,代码来源:Tables8kGCMMultiplier.java


示例10: doFinal

import org.bouncycastle.crypto.util.Pack; //导入依赖的package包/类
public int doFinal(byte[] out,
                   int outOff)
{
    finish();

    Pack.intToBigEndian(this.V[0], out, outOff + 0);
    Pack.intToBigEndian(this.V[1], out, outOff + 4);
    Pack.intToBigEndian(this.V[2], out, outOff + 8);
    Pack.intToBigEndian(this.V[3], out, outOff + 12);
    Pack.intToBigEndian(this.V[4], out, outOff + 16);
    Pack.intToBigEndian(this.V[5], out, outOff + 20);
    Pack.intToBigEndian(this.V[6], out, outOff + 24);
    Pack.intToBigEndian(this.V[7], out, outOff + 28);

    reset();

    return DIGEST_LENGTH;
}
 
开发者ID:NoYouShutup,项目名称:CryptMeme,代码行数:19,代码来源:SM3Digest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java XPathVisitor类代码示例发布时间:2022-05-22
下一篇:
Java ErrorCodes类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap