protected String encode(String raw) { return Base64Util.encodeToString(raw); }
public static String decodeToString(byte[] bytes) { return new String(decode(bytes)); } }
public static byte[] encode(String raw) { return encode(raw.getBytes(StandardCharsets.UTF_8)); }
protected String encode(String raw) { return Base64Util.encodeToString(raw); }
public static byte[] decode(byte[] bytes) { return decode(new String(bytes)); }
public static String encodeToString(String raw) { return encodeToString(raw.getBytes(StandardCharsets.UTF_8)); }
public static String decodeToString(String raw) { return new String(decode(raw)); }
public static byte[] encode(byte[] bytes) { return encodeToString(bytes).getBytes(StandardCharsets.UTF_8); }
private Map<String, String> createSecretFromAnnotations(final Map<String, String> annotations) throws IOException { final Set<Map.Entry<String, String>> entries = annotations.entrySet(); final Map<String, String> secretFileLocations = new HashMap<>(); for(Iterator<Map.Entry<String, String>> it = entries.iterator(); it.hasNext(); ) { Map.Entry<String, String> entry = it.next(); final String key = entry.getKey(); if(key.startsWith(PREFIX_ANNOTATION)) { byte[] bytes = readContent(entry.getValue()); secretFileLocations.put(getOutput(key), Base64Util.encodeToString(bytes)); it.remove(); } } return secretFileLocations; }
continue; data.put(SecretConstants.DOCKER_DATA_KEY, Base64Util.encodeToString(dockerSecret)); type = SecretConstants.DOCKER_CONFIG_TYPE;