aQute.lib.base64.Base64.decodeBase64()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(177)

本文整理了Java中aQute.lib.base64.Base64.decodeBase64()方法的一些代码示例,展示了Base64.decodeBase64()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Base64.decodeBase64()方法的具体详情如下:
包路径:aQute.lib.base64.Base64
类名称:Base64
方法名:decodeBase64

Base64.decodeBase64介绍

暂无

代码示例

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public static byte[] decodeBase64(Reader rdr) throws IOException {
  return decodeBase64(rdr, DEFAULT_MAX_INPUT_LENGTH);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public static byte[] decodeBase64(InputStream in) throws IOException {
  return decodeBase64(in, DEFAULT_MAX_INPUT_LENGTH);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public Base64(String s) {
  data = decodeBase64(s);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public Base64(String s) {
  data = decodeBase64(s);
}

代码示例来源:origin: org.osgi/osgi.enroute.configurer.simple.provider

public static byte[] decodeBase64(InputStream in) throws IOException {
  return decodeBase64(in, DEFAULT_MAX_INPUT_LENGTH);
}

代码示例来源:origin: org.osgi/osgi.enroute.dtos.bndlib.provider

public Base64(String s) {
  data = decodeBase64(s);
}

代码示例来源:origin: biz.aQute/bndlib

public Base64(String s) {
  data = decodeBase64(s);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public final static byte[] decodeBase64(String string) {
  try {
    return decodeBase64(new StringReader(string));
  } catch (IOException e) {
    // cannot get IO exceptions on String
    return null;
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.repository

public final static byte[] decodeBase64(String string) {
  try {
    return decodeBase64(new StringReader(string));
  } catch (IOException e) {
    // cannot get IO exceptions on String
    return null;
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.resolve

public final static byte[] decodeBase64(String string) {
  try {
    return decodeBase64(new StringReader(string));
  } catch (IOException e) {
    // cannot get IO exceptions on String
    return null;
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public final static byte[] decodeBase64(String string) {
  try {
    return decodeBase64(new StringReader(string));
  } catch (IOException e) {
    // cannot get IO exceptions on String
    return null;
  }
}

代码示例来源:origin: org.osgi/osgi.enroute.configurer.simple.provider

public final static byte[] decodeBase64(String string) {
  try {
    return decodeBase64(new StringReader(string));
  } catch (IOException e) {
    // cannot get IO exceptions on String
    return null;
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public static byte[] decodeBase64(InputStream in, int maxLength) throws IOException {
  return decodeBase64(new BufferedReader(new InputStreamReader(in, US_ASCII)), maxLength);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public final static byte[] decodeBase64(File file) throws IOException {
  if (file.length() > Integer.MAX_VALUE)
    throw new IllegalArgumentException("File " + file + " is >4Gb for base 64 decoding");
  try {
    return decodeBase64(Files.newBufferedReader(file.toPath(), US_ASCII), (int) file.length() * 2 / 3);
  } catch (IllegalArgumentException iae) {
    throw new IllegalArgumentException(iae.getMessage() + ": " + file, iae);
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public final static byte[] decodeBase64(File file) throws IOException {
  if (file.length() > Integer.MAX_VALUE)
    throw new IllegalArgumentException("File " + file + " is >4Gb for base 64 decoding");
  try {
    return decodeBase64(Files.newBufferedReader(file.toPath(), US_ASCII), (int) file.length() * 2 / 3);
  } catch (IllegalArgumentException iae) {
    throw new IllegalArgumentException(iae.getMessage() + ": " + file, iae);
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.repository

public final static byte[] decodeBase64(File file) throws IOException {
  if (file.length() > Integer.MAX_VALUE)
    throw new IllegalArgumentException("File " + file + " is >4Gb for base 64 decoding");
  try {
    return decodeBase64(Files.newBufferedReader(file.toPath(), US_ASCII), (int) file.length() * 2 / 3);
  } catch (IllegalArgumentException iae) {
    throw new IllegalArgumentException(iae.getMessage() + ": " + file, iae);
  }
}

代码示例来源:origin: org.osgi/osgi.enroute.configurer.simple.provider

public final static byte[] decodeBase64(File file) throws IOException {
  if (file.length() > Integer.MAX_VALUE)
    throw new IllegalArgumentException("File " + file + " is >4Gb for base 64 decoding");
  try {
    return decodeBase64(Files.newBufferedReader(file.toPath(), US_ASCII), (int) file.length() * 2 / 3);
  } catch (IllegalArgumentException iae) {
    throw new IllegalArgumentException(iae.getMessage() + ": " + file, iae);
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.resolve

public final static byte[] decodeBase64(File file) throws IOException {
  if (file.length() > Integer.MAX_VALUE)
    throw new IllegalArgumentException("File " + file + " is >4Gb for base 64 decoding");
  try {
    return decodeBase64(Files.newBufferedReader(file.toPath(), US_ASCII), (int) file.length() * 2 / 3);
  } catch (IllegalArgumentException iae) {
    throw new IllegalArgumentException(iae.getMessage() + ": " + file, iae);
  }
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public static String decrypt(String base64Encrypted, String passPhrase) throws Exception {
  Matcher matcher = DECORATED_PASSWORD_P.matcher(base64Encrypted);
  if (!matcher.matches()) {
    return null;
  }
  String expr = matcher.group("expr");
  byte[] encryptedPayload = Base64.decodeBase64(expr);
  byte[] payload = decrypt(encryptedPayload, passPhrase);
  return new String(payload, StandardCharsets.UTF_8);
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public static String decrypt(String base64Encrypted, String passPhrase) throws Exception {
  Matcher matcher = DECORATED_PASSWORD_P.matcher(base64Encrypted);
  if (!matcher.matches()) {
    return null;
  }
  String expr = matcher.group("expr");
  byte[] encryptedPayload = Base64.decodeBase64(expr);
  byte[] payload = decrypt(encryptedPayload, passPhrase);
  return new String(payload, StandardCharsets.UTF_8);
}

相关文章

微信公众号

最新文章

更多