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

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

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

BCrypt.ekskey介绍

[英]Perform the "enhanced key schedule" step described by Provos and Mazieres in "A Future-Adaptable Password Scheme" http://www.openbsd.org/papers/bcrypt-paper.ps
[中]执行Provos和Mazieres在“未来自适应密码方案”中描述的“增强密钥计划”步骤http://www.openbsd.org/papers/bcrypt-paper.ps

代码示例

代码示例来源: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

ekskey(salt, password);
for (i = 0; i != rounds; i++) {
  key(password);

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

ekskey(salt, password);
for (i = 0; i != rounds; i++) {
  key(password);

代码示例来源: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

ekskey(salt, password);
for (i = 0; i != rounds; i++) {
  key(password);

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

ekskey(salt, password);
for (i = 0; i != rounds; i++) {
  key(password);

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

ekskey(salt, password);
for (i = 0; i != rounds; i++) {
  key(password);

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

ekskey(salt, password);
for (i = 0; i != rounds; i++) {
  key(password);

代码示例来源: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

ekskey(salt, password);
for (i = 0; i != rounds; i++) {
  key(password);

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

ekskey(salt, password);
for (i = 0; i < rounds; i++) {
 key(password);

相关文章