This method decodes a base 64 string into its original bytes.

@param base64String The base 64 encoded string.
@return The corresponding decoded bytes.
965341
public final byte[] decodeString(String base64String) {
        logger.entry();
        byte[] decodedBytes = Base64Utils.decode(base64String);
        logger.exit();
        return decodedBytes;
    }
696456
public static byte[] fromBase64(String data) {
    if (data == null) {
      return null;
    }

    int len = data.length();
    assert (len % 4) == 0;

    if (len == 0) {
      return new byte[0];
    }

    char[] chars = new char[len];
    data.getChars(0, len, chars, 0);

    int olen = 3 * (len / 4);
    if (chars[len - 2] == '=') {
      --olen;
    }
    if (chars[len - 1] == '=') {
      --olen;
    }

    byte[] bytes = new byte[olen];

    int iidx = 0;
    int oidx = 0;
    while (iidx < len) {
      int c0 = base64Values[chars[iidx++] & 0xff];
      int c1 = base64Values[chars[iidx++] & 0xff];
      int c2 = base64Values[chars[iidx++] & 0xff];
      int c3 = base64Values[chars[iidx++] & 0xff];
      int c24 = (c0 << 18) | (c1 << 12) | (c2 << 6) | c3;

      bytes[oidx++] = (byte) (c24 >> 16);
      if (oidx == olen) {
        break;
      }
      bytes[oidx++] = (byte) (c24 >> 8);
      if (oidx == olen) {
        break;
      }
      bytes[oidx++] = (byte) c24;
    }

    return bytes;
  }
101236
public static BigInteger decode(String s) {
        byte[] bytes = Base64.decodeBase64(s);

        BigInteger bi = new BigInteger(1, bytes);
        return bi;
    }
589940
public static String decodeBase64(String content, Charset charset, TestContext context) {
        return new DecodeBase64Function().execute(Arrays.asList(content, charset.displayName()), context);
    }
1219349
@Pure
	public static byte[] parseString(String text) {
		return Base64.getDecoder().decode(Strings.nullToEmpty(text).trim());
	}
925096
public static String decryptToBase64(String content) {
        byte[] decodedValue = DatatypeConverter.parseBase64Binary(content);
        return new String(decodedValue, CHARSET);
    }
1101705
private byte[] decodeBase64(String text) {
        Objects.requireNonNull(text, Required.PLAIN_TEXT.toString());
        return org.apache.commons.codec.binary.Base64.decodeBase64(text);
    }
436666
public static String base64Encode(byte[] bytes) {
    if (bytes == null) {
      throw new IllegalArgumentException("Input bytes must not be null.");
    }
    if (bytes.length >= BASE64_UPPER_BOUND) {
      throw new IllegalArgumentException(
          "Input bytes length must not exceed " + BASE64_UPPER_BOUND);
    }

    // Every three bytes is encoded into four characters.
    //
    // Example:
    //           input |0 1 0 1 0 0 1 0|0 1 1 0 1 1 1 1|0 1 1 0 0 0 1 0|
    // encode grouping |0 1 0 1 0 0|1 0 0 1 1 0|1 1 1 1 0 1|1 0 0 0 1 0|
    //   encoded ascii |     U     |     m     |     9     |     i     |

    int triples = bytes.length / 3;

    // If the number of input bytes is not a multiple of three, padding characters will be added.
    if (bytes.length % 3 != 0) {
      triples += 1;
    }

    // The encoded string will have four characters for every three bytes.
    char[] encoding = new char[triples << 2];

    for (int in = 0, out = 0; in < bytes.length; in += 3, out += 4) {
      int triple = (bytes[in] & 0xff) << 16;
      if (in + 1 < bytes.length) {
        triple |= ((bytes[in + 1] & 0xff) << 8);
      }
      if (in + 2 < bytes.length) {
        triple |= (bytes[in + 2] & 0xff);
      }
      encoding[out] = BASE64_CHARS.charAt((triple >> 18) & 0x3f);
      encoding[out + 1] = BASE64_CHARS.charAt((triple >> 12) & 0x3f);
      encoding[out + 2] = BASE64_CHARS.charAt((triple >> 6) & 0x3f);
      encoding[out + 3] = BASE64_CHARS.charAt(triple & 0x3f);
    }

    // Add padding characters if needed.
    for (int i = encoding.length - (triples * 3 - bytes.length); i < encoding.length; i++) {
      encoding[i] = '=';
    }

    return String.valueOf(encoding);
  }
1300568
public static byte[] decodeString(String encoded) {
        return encoded == null ? null : Base64.getDecoder().decode(encoded);
    }
269070
public static final String base64Decode(String str, String enc) throws UnsupportedEncodingException {
        if (str == null) {
            return null;
        } else {
            byte data[] = getBytes(str);
            return base64Decode(new String(data, enc));
        }

    }
186496
private static String base64EncodeToString(String s) {
    final byte[] bytes = s.getBytes(StandardCharsets.ISO_8859_1);
    return Base64.encodeBase64String(bytes);
  }
14253
function decode(base64string) {
        var number = 0;
        var chars = base64string.split('');
        var len = chars.length;
        var val10;
        var val64;
        var asciiVal;

        for (var i = 0; i < len; i++) {

            val64 = chars[len - 1 - i];
            asciiVal = val64.charCodeAt(0);
            val10 = 0;
            if (val64 === '_') {
                val10 = 63;
            }
            else if (val64 === '-') {
                val10 = 62;
            }
            else if (asciiVal > 96 && asciiVal < 123) {
                val10 = asciiVal - 61;
            }
            else if (asciiVal > 64 && asciiVal < 91) {
                val10 = asciiVal - 55;
            }
            else if (asciiVal > 47 && asciiVal < 58) {
                val10 = asciiVal - 48;
            }
            else {
                throw new AppError({ msg: 'Non-base64value in encoded string' });
            }

            number += (Math.pow(64, i) * val10);
        }

        return number;
    }
794670
def decode_base64(data: str) -> bytes:
    
    missing_padding = len(data) % 4
    if missing_padding != 0:
        data += "=" * (4 - missing_padding)
    return base64.decodebytes(data.encode("utf-8"))
119047
public static Binary fromBase64(String base64) {
        byte[] arr = Base64.decode(base64);
        return Binary.wrap(arr);
    }
242513
@JsonValue
  public String toBase64()
  {
    byte[] asBytes = toBytes();
    return StringUtils.fromUtf8(StringUtils.encodeBase64(asBytes));
  }
810631
def decode_b64(data):
    ''''''
    byte_string = data.encode('utf-8')
    decoded = base64.b64decode(byte_string)
    return decoded.decode('utf-8')
933314
public static String base64dec(String str) {
		if (str == null) {
			return "";
		}
		try {
			return new String(Base64.decodeBase64(str), Config.DEFAULT_ENCODING);
		} catch (UnsupportedEncodingException ex) {
			return "";
		}
	}