com.yahoo.vespa.security.tool.crypto.ConvertBaseTool Maven / Gradle / Ivy
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.security.tool.crypto;
import com.yahoo.security.Base58;
import com.yahoo.security.Base62;
import com.yahoo.vespa.security.tool.CliUtils;
import com.yahoo.vespa.security.tool.Tool;
import com.yahoo.vespa.security.tool.ToolDescription;
import com.yahoo.vespa.security.tool.ToolInvocation;
import org.apache.commons.cli.Option;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.Base64;
import java.util.List;
import static com.yahoo.security.ArrayUtils.fromUtf8Bytes;
import static com.yahoo.security.ArrayUtils.hex;
import static com.yahoo.security.ArrayUtils.unhex;
/**
* Simple tool to convert between different Base N encodings, for a fixed set of N.
*
* @author vekterli
*/
public class ConvertBaseTool implements Tool {
private static final int MAX_IN_BYTES = 1024;
static final String FROM_OPTION = "from";
static final String TO_OPTION = "to";
private static final List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy