private String replaceEncodedPassword(String step) { int firstQuoteIndex = step.indexOf("'"); int lastQuoteIndex = step.lastIndexOf("'"); String encodedPassword = step.substring(++firstQuoteIndex, lastQuoteIndex); String decodedPassword = PicketBoxObfuscator.decode(encodedPassword); String decodedStep = step.replace(encodedPassword, decodedPassword); return decodedStep; }
if (RestrictedFormat.isRestrictedFormat(value)) { value = RestrictedFormat.retrieveValue(value); value = PicketBoxObfuscator.decode(value); } else { throw new Exception("Value not in a retricted format"); value = PicketBoxObfuscator.decode(value); } catch (Exception e2) { value = PicketBoxObfuscator.encode(value); } catch (Exception ex2) { PicketBoxObfuscator.decode(value); } catch (Exception e) { value = PicketBoxObfuscator.encode(value);
return oldValue; } else { return PicketBoxObfuscator.encode(newValue);
String[] hosts = Arrays.copyOfRange(args, 4, args.length); SchemaManager schemaManager = new SchemaManager(username, PicketBoxObfuscator.encode(password), hosts, cqlPort);
/** * @see Cluster.Builder#withCredentials(String, String) */ public ClusterBuilder withCredentialsObfuscated(String username, String obfuscatedPassword) { builder.withCredentials(username, PicketBoxObfuscator.decode(obfuscatedPassword)); return this; }
String value = entry.getValue(); if (value != null && entry.getKey().getType() == PropertySimpleType.PASSWORD) { entry.setValue(PicketBoxObfuscator.encode(value));
@Override public void deobfuscate(SystemSettings systemSettings) { for (Map.Entry<SystemSetting, String> entry : systemSettings.entrySet()) { String value = entry.getValue(); if (value != null && entry.getKey().getType() == PropertySimpleType.PASSWORD) { entry.setValue(PicketBoxObfuscator.decode(value)); } } }
@Override public String get(String key, String def) { String value = actualPreferences.get(key, null); if (value == null) { return def; } if (restrictedPreferences.contains(key) || userRestrictedPreferences.contains(key)) { try { if (RestrictedFormat.isRestrictedFormat(value)) { value = RestrictedFormat.retrieveValue(value); return PicketBoxObfuscator.decode(value); } else { throw new Exception("Value not in a restricted format"); } } catch (Exception ex) { this.put(key, value); return value; } } else { return value; } }
return PicketBoxObfuscator.decode(value); } else { return value == null ? "" : value;