org.mindrot.jbcrypt.BCrypt.init_key()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(116)

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

BCrypt.init_key介绍

[英]Initialise the Blowfish key schedule
[中]初始化河豚键时间表

代码示例

代码示例来源:origin: hierynomus/sshj

/**
 * Compatibility with new OpenBSD function.
 */
public void hash(byte[] hpass, byte[] hsalt, byte[] output) {
  init_key();
  ekskey(hsalt, hpass);
  for (int i = 0; i < 64; i++) {
    key(hsalt);
    key(hpass);
  }
  int[] buf = new int[openbsd_iv.length];
  System.arraycopy(openbsd_iv, 0, buf, 0, openbsd_iv.length);
  for (int i = 0; i < 8; i += 2) {
    for (int j = 0; j < 64; j++) {
      encipher(buf, i);
    }
  }
  for (int i = 0, j = 0; i < buf.length; i++) {
    // Output of this is little endian
    output[j++] = (byte)(buf[i] & 0xff);
    output[j++] = (byte)((buf[i] >> 8) & 0xff);
    output[j++] = (byte)((buf[i] >> 16) & 0xff);
    output[j++] = (byte)((buf[i] >> 24) & 0xff);
  }
}

代码示例来源:origin: hierynomus/sshj

throw new IllegalArgumentException ("Bad salt length");
init_key();
ekskey(salt, password);
for (i = 0; i != rounds; i++) {

代码示例来源:origin: com.hierynomus/sshj

throw new IllegalArgumentException ("Bad salt length");
init_key();
ekskey(salt, password);
for (i = 0; i != rounds; i++) {

代码示例来源:origin: org.connectbot.jbcrypt/jbcrypt

/**
 * Compatibility with new OpenBSD function.
 */
public void hash(byte[] hpass, byte[] hsalt, byte[] output) {
  init_key();
  ekskey(hsalt, hpass);
  for (int i = 0; i < 64; i++) {
    key(hsalt);
    key(hpass);
  }
  int[] buf = new int[openbsd_iv.length];
  System.arraycopy(openbsd_iv, 0, buf, 0, openbsd_iv.length);
  for (int i = 0; i < 8; i += 2) {
    for (int j = 0; j < 64; j++) {
      encipher(buf, i);
    }
  }
  for (int i = 0, j = 0; i < buf.length; i++) {
    // Output of this is little endian
    output[j++] = (byte)(buf[i] & 0xff);
    output[j++] = (byte)((buf[i] >> 8) & 0xff);
    output[j++] = (byte)((buf[i] >> 16) & 0xff);
    output[j++] = (byte)((buf[i] >> 24) & 0xff);
  }
}

代码示例来源:origin: org.connectbot.jbcrypt/jbcrypt

throw new IllegalArgumentException ("Bad salt length");
init_key();
ekskey(salt, password);
for (i = 0; i != rounds; i++) {

代码示例来源:origin: org.mindrot/jbcrypt

throw new IllegalArgumentException ("Bad salt length");
init_key();
ekskey(salt, password);
for (i = 0; i != rounds; i++) {

代码示例来源:origin: org.actframework/act

throw new IllegalArgumentException ("Bad salt length");
init_key();
ekskey(salt, password);
for (i = 0; i != rounds; i++) {

代码示例来源:origin: actframework/actframework

throw new IllegalArgumentException ("Bad salt length");
init_key();
ekskey(salt, password);
for (i = 0; i != rounds; i++) {

代码示例来源:origin: com.hierynomus/sshj

/**
 * Compatibility with new OpenBSD function.
 */
public void hash(byte[] hpass, byte[] hsalt, byte[] output) {
  init_key();
  ekskey(hsalt, hpass);
  for (int i = 0; i < 64; i++) {
    key(hsalt);
    key(hpass);
  }
  int[] buf = new int[openbsd_iv.length];
  System.arraycopy(openbsd_iv, 0, buf, 0, openbsd_iv.length);
  for (int i = 0; i < 8; i += 2) {
    for (int j = 0; j < 64; j++) {
      encipher(buf, i);
    }
  }
  for (int i = 0, j = 0; i < buf.length; i++) {
    // Output of this is little endian
    output[j++] = (byte)(buf[i] & 0xff);
    output[j++] = (byte)((buf[i] >> 8) & 0xff);
    output[j++] = (byte)((buf[i] >> 16) & 0xff);
    output[j++] = (byte)((buf[i] >> 24) & 0xff);
  }
}

代码示例来源:origin: de.svenkubiak/jBCrypt

throw new IllegalArgumentException ("Bad salt length");
init_key();
ekskey(salt, password);
for (i = 0; i != rounds; i++) {

代码示例来源:origin: rogerta/secrets-for-android

throw new IllegalArgumentException ("Bad salt length");
init_key();
ekskey(salt, password);
for (i = 0; i < rounds; i++) {

相关文章