org.spongycastle.crypto.macs.HMac.reset()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(148)

本文整理了Java中org.spongycastle.crypto.macs.HMac.reset()方法的一些代码示例,展示了HMac.reset()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HMac.reset()方法的具体详情如下:
包路径:org.spongycastle.crypto.macs.HMac
类名称:HMac
方法名:reset

HMac.reset介绍

[英]Reset the mac generator.
[中]重置mac生成器。

代码示例

代码示例来源:origin: com.madgag.spongycastle/bctls-jdk15on

public void reset()
  {
    hmac.reset();
  }
}

代码示例来源:origin: fr.acinq/bitcoinj-core

static byte[] hmacSha512(HMac hmacSha512, byte[] input) {
  hmacSha512.reset();
  hmacSha512.update(input, 0, input.length);
  byte[] out = new byte[64];
  hmacSha512.doFinal(out, 0);
  return out;
}

代码示例来源:origin: com.google/bitcoinj

static byte[] hmacSha512(HMac hmacSha512, byte[] input) {
  hmacSha512.reset();
  hmacSha512.update(input, 0, input.length);
  byte[] out = new byte[64];
  hmacSha512.doFinal(out, 0);
  return out;
}

代码示例来源:origin: greenaddress/GreenBits

static byte[] hmacSha512(HMac hmacSha512, byte[] input) {
  hmacSha512.reset();
  hmacSha512.update(input, 0, input.length);
  byte[] out = new byte[64];
  hmacSha512.doFinal(out, 0);
  return out;
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

static byte[] hmacSha512(HMac hmacSha512, byte[] input) {
  hmacSha512.reset();
  hmacSha512.update(input, 0, input.length);
  byte[] out = new byte[64];
  hmacSha512.doFinal(out, 0);
  return out;
}

代码示例来源:origin: HashEngineering/dashj

static byte[] hmacSha512(HMac hmacSha512, byte[] input) {
  hmacSha512.reset();
  hmacSha512.update(input, 0, input.length);
  byte[] out = new byte[64];
  hmacSha512.doFinal(out, 0);
  return out;
}

代码示例来源:origin: com.madgag/sc-light-jdk15on

public int doFinal(
  byte[] out,
  int outOff)
{
  byte[] tmp = new byte[digestSize];
  digest.doFinal(tmp, 0);
  digest.update(outputPad, 0, outputPad.length);
  digest.update(tmp, 0, tmp.length);
  int     len = digest.doFinal(out, outOff);
  reset();
  return len;
}

相关文章