aQute.lib.hex.Hex.toByteArray()方法的使用及代码示例

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

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

Hex.toByteArray介绍

暂无

代码示例

代码示例来源:origin: biz.aQute/bndlib

@Override
  Object decode(Decoder dec, String s) throws Exception {
    return Hex.toByteArray(s);
  }
}

代码示例来源:origin: org.osgi/osgi.enroute.rest.simple.provider

@Override
  public Object convert(Type dest, Object o) throws Exception {
    if (o instanceof String)
      return Hex.toByteArray((String) o);
    return null;
  }
});

代码示例来源:origin: org.osgi/osgi.enroute.jsonrpc.simple.provider

@Override
  public Object convert(Type dest, Object o) throws Exception {
    if (o instanceof String) {
      String s = (String) o;
      if (Hex.isHex(s))
        return Hex.toByteArray(s);
    }
    return null;
  }
});

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

return Hex.toByteArray(sb.toString());
else
  return Base64.decodeBase64(sb.toString());

代码示例来源:origin: biz.aQute.bnd/bndlib

return Hex.toByteArray(sb.toString());
else
  return Base64.decodeBase64(sb.toString());

代码示例来源:origin: org.osgi/osgi.enroute.configurer.simple.provider

return Hex.toByteArray(sb.toString());
else
  return Base64.decodeBase64(sb.toString());

代码示例来源:origin: org.osgi/osgi.enroute.dtos.bndlib.provider

return Hex.toByteArray(sb.toString());
else
  return Base64.decodeBase64(sb.toString());

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

return Hex.toByteArray(sb.toString());
else
  return Base64.decodeBase64(sb.toString());

代码示例来源:origin: biz.aQute.bnd/bnd

return Hex.toByteArray(sb.toString());
else
  return Base64.decodeBase64(sb.toString());

代码示例来源:origin: org.osgi/osgi.enroute.easse.simple.adapter

return Hex.toByteArray(sb.toString());
else
  return Base64.decodeBase64(sb.toString());

代码示例来源:origin: org.osgi/osgi.enroute.web.simple.provider

return Hex.toByteArray(sb.toString());
else
  return Base64.decodeBase64(sb.toString());

代码示例来源:origin: org.osgi/osgi.enroute.rest.simple.provider

return Hex.toByteArray(sb.toString());
else
  return Base64.decodeBase64(sb.toString());

代码示例来源:origin: org.osgi/osgi.enroute.jsonrpc.simple.provider

return Hex.toByteArray(sb.toString());
else
  return Base64.decodeBase64(sb.toString());

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public void setProperties(Map<String, String> map) throws Exception {
  super.setProperties(map);
  String email = map.get(EMAIL);
  if (email == null) {
    Settings settings = registry.getPlugin(Settings.class);
    email = settings.getEmail();
    if (email == null) {
      error(
        "The bnd authentication URL connection handler has no email set as property, nor have the bnd settings been set");
      return;
    }
    credentials(email, settings.getPublicKey(), settings.getPrivateKey());
  } else {
    String pub = map.get(PUBLIC_KEY);
    String prv = map.get(PRIVATE_KEY);
    if (pub == null || !Hex.isHex(pub)) {
      error("The bnd authentication URL public key for email %s is not a hex string %s", email, pub);
      return;
    }
    if (prv == null || !Hex.isHex(prv)) {
      error("The bnd authentication URL private key for email %s is not a hex string", email);
      return;
    }
    credentials(email, Hex.toByteArray(pub), Hex.toByteArray(prv));
  }
  machine = map.get(MACHINE);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

@Override
public void setProperties(Map<String, String> map) throws Exception {
  super.setProperties(map);
  String email = map.get(EMAIL);
  if (email == null) {
    Settings settings = registry.getPlugin(Settings.class);
    email = settings.getEmail();
    if (email == null) {
      error(
        "The bnd authentication URL connection handler has no email set as property, nor have the bnd settings been set");
      return;
    }
    credentials(email, settings.getPublicKey(), settings.getPrivateKey());
  } else {
    String pub = map.get(PUBLIC_KEY);
    String prv = map.get(PRIVATE_KEY);
    if (pub == null || !Hex.isHex(pub)) {
      error("The bnd authentication URL public key for email %s is not a hex string %s", email, pub);
      return;
    }
    if (prv == null || !Hex.isHex(prv)) {
      error("The bnd authentication URL private key for email %s is not a hex string", email);
      return;
    }
    credentials(email, Hex.toByteArray(pub), Hex.toByteArray(prv));
  }
  machine = map.get(MACHINE);
}

代码示例来源:origin: biz.aQute.bnd/bndlib

if (digest != null) {
  if (Hex.isHex(digest.trim())) {
    byte[] sha1 = Hex.toByteArray(digest);
    byte[] filesha1 = SHA1.digest(f).digest();
    if (!Arrays.equals(sha1, filesha1)) {

代码示例来源:origin: biz.aQute.bnd/bnd

if (digest != null) {
  if (Hex.isHex(digest.trim())) {
    byte[] sha1 = Hex.toByteArray(digest);
    byte[] filesha1 = SHA1.digest(f).digest();
    if (!Arrays.equals(sha1, filesha1)) {

代码示例来源:origin: biz.aQute.bnd/bndlib

@Override
public void setProperties(Map<String,String> map) throws Exception {
  super.setProperties(map);
  String email = map.get(EMAIL);
  if (email == null) {
    Workspace ws = registry.getPlugin(Workspace.class);
    Settings settings = registry.getPlugin(Settings.class);
    email = settings.getEmail();
    if (email == null) {
      error("The bnd authentication URL connection handler has no email set as property, nor have the bnd settings been set");
      return;
    }
    credentials(email, settings.getPublicKey(), settings.getPrivateKey());
  } else {
    String pub = map.get(PUBLIC_KEY);
    String prv = map.get(PRIVATE_KEY);
    if (pub == null || !Hex.isHex(pub)) {
      error("The bnd authentication URL public key for email %s is not a hex string %s", email, pub);
      return;
    }
    if (prv == null || !Hex.isHex(prv)) {
      error("The bnd authentication URL private key for email %s is not a hex string", email);
      return;
    }
    credentials(email, Hex.toByteArray(pub), Hex.toByteArray(prv));
  }
  machine = map.get(MACHINE);
}

代码示例来源:origin: biz.aQute.bnd/bnd

@Override
public void setProperties(Map<String,String> map) throws Exception {
  super.setProperties(map);
  String email = map.get(EMAIL);
  if (email == null) {
    Workspace ws = registry.getPlugin(Workspace.class);
    Settings settings = registry.getPlugin(Settings.class);
    email = settings.getEmail();
    if (email == null) {
      error("The bnd authentication URL connection handler has no email set as property, nor have the bnd settings been set");
      return;
    }
    credentials(email, settings.getPublicKey(), settings.getPrivateKey());
  } else {
    String pub = map.get(PUBLIC_KEY);
    String prv = map.get(PRIVATE_KEY);
    if (pub == null || !Hex.isHex(pub)) {
      error("The bnd authentication URL public key for email %s is not a hex string %s", email, pub);
      return;
    }
    if (prv == null || !Hex.isHex(prv)) {
      error("The bnd authentication URL private key for email %s is not a hex string", email);
      return;
    }
    credentials(email, Hex.toByteArray(pub), Hex.toByteArray(prv));
  }
  machine = map.get(MACHINE);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

if (digest != null) {
  if (Hex.isHex(digest.trim())) {
    byte[] sha1 = Hex.toByteArray(digest);
    byte[] filesha1 = SHA1.digest(f)
      .digest();

相关文章