Tabnine Logo
Base64.decode
Code IndexAdd Tabnine to your IDE (free)

How to use
decode
method
in
com.nimbusds.jose.util.Base64

Best Java code snippets using com.nimbusds.jose.util.Base64.decode (Showing top 9 results out of 315)

origin: com.nimbusds/nimbus-jose-jwt

/**
 * Decodes this Base64 object to an unsigned big integer.
 *
 * <p>Same as {@code new BigInteger(1, base64.decode())}.
 *
 * @return The resulting big integer.
 */
public BigInteger decodeToBigInteger() {
  return new BigInteger(1, decode());
}
origin: com.nimbusds/nimbus-jose-jwt

/**
 * Decodes this Base64 object to a string.
 *
 * @return The resulting string, in the UTF-8 character set.
 */
public String decodeToString() {
  return new String(decode(), StandardCharset.UTF_8);
}
origin: org.apereo.cas/cas-server-support-token-authentication

  /**
   * Convert secret to bytes honoring {@link RegisteredServiceProperty.RegisteredServiceProperties#TOKEN_SECRETS_ARE_BASE64_ENCODED}
   * config parameter.
   *
   * @param secret                - String to be represented to byte[]
   * @param secretIsBase64Encoded - is this a base64 encoded #secret?
   * @return byte[] representation of #secret
   */
  private static byte[] getSecretBytes(final String secret, final boolean secretIsBase64Encoded) {
    return secretIsBase64Encoded ? new Base64(secret).decode() : secret.getBytes(UTF_8);
  }
}
origin: org.pac4j/pac4j-jwt

public void setSecretBase64(final String secret) {
  this.secret = new Base64(secret).decode();
}
origin: de.adorsys.oauth/oauth-server

private static byte[] getSecretKey() {
  return new Base64(SECRET_KEY).decode();
}

origin: org.pac4j/pac4j-jwt

public void setSecretBase64(final String secret) {
  this.secret = new Base64(secret).decode();
}
origin: com.nimbusds/nimbus-jose-jwt

X509Certificate cert = X509CertUtils.parse(b64List.get(i).decode());
origin: com.nimbusds/nimbus-jose-jwt

/**
 * Parses a PEM-encoded X.509 certificate.
 *
 * @param pemEncodedCert The PEM-encoded X.509 certificate, as a
 *                       string. May be {@code null}.
 *
 * @return The X.509 certificate, {@code null} if parsing failed.
 */
public static X509Certificate parse(final String pemEncodedCert) {
  if (pemEncodedCert == null || pemEncodedCert.isEmpty()) {
    return null;
  }
  final int markerStart = pemEncodedCert.indexOf(PEM_BEGIN_MARKER);
  if (markerStart < 0) {
    return null;
  }
  String buf = pemEncodedCert.substring(markerStart + PEM_BEGIN_MARKER.length());
  final int markerEnd = buf.indexOf(PEM_END_MARKER);
  if (markerEnd < 0) {
    return null;
  }
  buf = buf.substring(0, markerEnd);
  buf = buf.replaceAll("\\s", "");
  return parse(new Base64(buf).decode());
}

origin: GluuFederation/oxAuth

JWSObject jwsObject = JWSObject.parse(reader.readLine());
List<String> certificateChain = jwsObject.getHeader().getX509CertChain().stream().map(c -> base64Service.encodeToString(c.decode()))
    .collect(Collectors.toList());
JWSAlgorithm algorithm = jwsObject.getHeader().getAlgorithm();
com.nimbusds.jose.utilBase64decode

Javadoc

Decodes this Base64 object to a byte array.

Popular methods of Base64

  • <init>
    Creates a new Base64-encoded object.
  • encode
    Base64-encodes the specified byte array.
  • toString
    Returns a Base64 string representation of this object. The string will be chunked into 76 character
  • decodeToString
    Decodes this Base64 object to a string.

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • onCreateOptionsMenu (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now