@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; } });
if (!Hex.isHex(head)) {
if (!Hex.isHex(unicode)) { error("Invalid unicode string \\u%s", sb); return '?';
if (!Hex.isHex(head)) {
if (!Hex.isHex(head)) {
if (!Hex.isHex(head)) {
if (!Hex.isHex(unicode)) { error("Invalid unicode string \\u%s", sb); return '?';
if (!Hex.isHex(unicode)) { error("Invalid unicode string \\u%s", sb); return '?';
if (!Hex.isHex(unicode)) { error("Invalid unicode string \\u%s", sb); return '?';
@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); }
@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); }
if (Hex.isHex(digest.trim())) { byte[] sha1 = Hex.toByteArray(digest); byte[] filesha1 = SHA1.digest(f).digest();
if (Hex.isHex(digest.trim())) { byte[] sha1 = Hex.toByteArray(digest); byte[] filesha1 = SHA1.digest(f).digest();
@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); }
@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); }
.get(PLUGINPATH_SHA1_ATTR); if (digest != null) { if (Hex.isHex(digest.trim())) { byte[] sha1 = Hex.toByteArray(digest); byte[] filesha1 = SHA1.digest(f)
.get(PLUGINPATH_SHA1_ATTR); if (digest != null) { if (Hex.isHex(digest.trim())) { byte[] sha1 = Hex.toByteArray(digest); byte[] filesha1 = SHA1.digest(f)