org.apache.sshd.common.util.buffer.Buffer.putRawPublicKey()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(91)

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

Buffer.putRawPublicKey介绍

暂无

代码示例

代码示例来源:origin: org.apache.sshd/sshd-common

/**
 * @param d   The {@link Digest} to use
 * @param key the public key - ignored if {@code null}
 * @return the fingerprint or {@code null} if no key.
 * <B>Note:</B> if exception encountered then returns the exception's simple class name
 * @see DigestUtils#getFingerPrint(Digest, byte[], int, int)
 */
public static String getFingerPrint(Digest d, PublicKey key) {
  if (key == null) {
    return null;
  }
  try {
    Buffer buffer = new ByteArrayBuffer();
    buffer.putRawPublicKey(key);
    return DigestUtils.getFingerPrint(d, buffer.array(), 0, buffer.wpos());
  } catch (Exception e) {
    return e.getClass().getSimpleName();
  }
}

代码示例来源:origin: org.apache.sshd/sshd-osgi

/**
 * @param d   The {@link Digest} to use
 * @param key the public key - ignored if {@code null}
 * @return the fingerprint or {@code null} if no key.
 * <B>Note:</B> if exception encountered then returns the exception's simple class name
 * @see DigestUtils#getFingerPrint(Digest, byte[], int, int)
 */
public static String getFingerPrint(Digest d, PublicKey key) {
  if (key == null) {
    return null;
  }
  try {
    Buffer buffer = new ByteArrayBuffer();
    buffer.putRawPublicKey(key);
    return DigestUtils.getFingerPrint(d, buffer.array(), 0, buffer.wpos());
  } catch (Exception e) {
    return e.getClass().getSimpleName();
  }
}

代码示例来源:origin: org.apache.sshd/sshd-common

public static byte[] getRawFingerprint(Digest d, PublicKey key) throws Exception {
  if (key == null) {
    return null;
  }
  Buffer buffer = new ByteArrayBuffer();
  buffer.putRawPublicKey(key);
  return DigestUtils.getRawFingerprint(d, buffer.array(), 0, buffer.wpos());
}

代码示例来源:origin: org.apache.sshd/sshd-osgi

public static byte[] getRawFingerprint(Digest d, PublicKey key) throws Exception {
  if (key == null) {
    return null;
  }
  Buffer buffer = new ByteArrayBuffer();
  buffer.putRawPublicKey(key);
  return DigestUtils.getRawFingerprint(d, buffer.array(), 0, buffer.wpos());
}

代码示例来源:origin: org.apache.sshd/sshd-osgi

public void putPublicKey(PublicKey key) {
  int ow = wpos();
  putInt(0);
  int ow1 = wpos();
  putRawPublicKey(key);
  int ow2 = wpos();
  wpos(ow);
  putInt(ow2 - ow1);
  wpos(ow2);
}

代码示例来源:origin: org.apache.sshd/sshd-common

public void putPublicKey(PublicKey key) {
  int ow = wpos();
  putInt(0);
  int ow1 = wpos();
  putRawPublicKey(key);
  int ow2 = wpos();
  wpos(ow);
  putInt(ow2 - ow1);
  wpos(ow2);
}

代码示例来源:origin: org.apache.sshd/sshd-core

buffer.clear();
buffer.putRawPublicKey(pub);

代码示例来源:origin: org.apache.sshd/sshd-osgi

buffer.clear();
buffer.putRawPublicKey(pub);

代码示例来源:origin: org.apache.sshd/sshd-core

buffer.putRawPublicKey(kp.getPublic());
byte[] k_s = buffer.getCompactData();

代码示例来源:origin: org.apache.sshd/sshd-osgi

buffer.putRawPublicKey(kp.getPublic());
byte[] k_s = buffer.getCompactData();

代码示例来源:origin: org.apache.sshd/sshd-core

buffer.putRawPublicKey(kp.getPublic());
k_s = buffer.getCompactData();

代码示例来源:origin: org.apache.sshd/sshd-osgi

buffer.putRawPublicKey(kp.getPublic());
k_s = buffer.getCompactData();

相关文章