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

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

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

Hex.isHex介绍

暂无

代码示例

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

if (!Hex.isHex(head)) {

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

if (!Hex.isHex(unicode)) {
  error("Invalid unicode string \\u%s", sb);
  return '?';

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

if (!Hex.isHex(head)) {

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

if (!Hex.isHex(head)) {

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

if (!Hex.isHex(head)) {

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

if (!Hex.isHex(unicode)) {
  error("Invalid unicode string \\u%s", sb);
  return '?';

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

if (!Hex.isHex(unicode)) {
  error("Invalid unicode string \\u%s", sb);
  return '?';

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

if (!Hex.isHex(unicode)) {
  error("Invalid unicode string \\u%s", sb);
  return '?';

代码示例来源: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 (Hex.isHex(digest.trim())) {
  byte[] sha1 = Hex.toByteArray(digest);
  byte[] filesha1 = SHA1.digest(f).digest();

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

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

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

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

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

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

相关文章