Decodes an encoded resize mode and resize weight and answers the resize weight.

@param token	the encoded resize weight
@return the decoded resize weight
@throws IllegalArgumentException if the string description is an invalid string
representation
345126
private static double parseResizeWeight(String token) {
        if (token.equals("g") || token.equals("grow")) {
            return DEFAULT_GROW;
        }
        if (token.equals("n") || token.equals("nogrow") || token.equals("none")) {
            return NO_GROW;
        }
        // Must have format: grow(<double>)
        if ((token.startsWith("grow(") || token.startsWith("g("))
                && token.endsWith(")")) {
            int leftParen = token.indexOf('(');
            int rightParen = token.indexOf(')');
            String substring = token.substring(leftParen + 1, rightParen);
            return Double.parseDouble(substring);
        }
        throw new IllegalArgumentException(
                "The resize argument '" + token + "' is invalid. "
                + " Must be one of: grow, g, none, n, grow(<double>), g(<double>)");
    }
1175962
public function decode($token)
    {
        try {
            $data = JWT::decode($token, $this->secretKey, $this->allowed_algs);
        } catch (\UnexpectedValueException $e) {
            throw new \UnexpectedValueException($e->getMessage());
        } catch (\DomainException $e) {
            throw new \UnexpectedValueException($e->getMessage());
        }

        if ($data->exp < time()) {
            throw new \UnexpectedValueException('token not allowed');
        }

        return $data;
    }
896346
private static String decode(final String text)
        throws UnsupportedEncodingException {
        try {
            return URLDecoder.decode(text, Charset.defaultCharset().name());
        } catch (final IllegalArgumentException ex) {
            throw new DecodingException(ex);
        }
    }
600019
@Override
    public void setLimitOfTokenSize(int size) {
        if (0 >= size) {
            throw new IllegalArgumentException("Invalid limit on token size: " + size);
        }
        this.limitTokenSize = size;
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Limit on token size now: " + this.limitTokenSize);
        }
    }
1310348
public static String normalize(final String token) {
    String normalizedToken = "";

    char currentCharacter;
    int prevCharType = -1;
    char charType = '~';
    boolean addedStar = false;
    for (int i = 0; i < token.length(); i++) {

      currentCharacter = token.charAt(i);
      if (currentCharacter >= 'A' && currentCharacter <= 'Z') {
        charType = 'X';
      } else if (currentCharacter >= 'a' && currentCharacter <= 'z') {
        charType = 'x';
      } else if (currentCharacter >= '0' && currentCharacter <= '9') {
        charType = 'd';
      } else {
        charType = currentCharacter;
      }

      if (charType == prevCharType) {
        if (!addedStar) {
          normalizedToken += "*";
          addedStar = true;
        }
      } else {
        addedStar = false;
        normalizedToken += charType;
      }
      prevCharType = charType;
    }
    return normalizedToken;
  }
877742
protected E decode(String element) {
    return elementSerializer.decode(BaseEncoding.base16().decode(element));
  }
545363
@Override
  public Boolean decode(final String s) {
    checkNotNull(s);
    if ("true".equals(s)) {
      return Boolean.TRUE;
    } else if ("false".equals(s)) {
      return Boolean.FALSE;
    } else {
      throw new ConversionException(
          String.format("Strictly-converted booleans must be either 'true' or 'false', not %s", s));
    }
  }
559188
public function decode(Token $token)
    {
        $payloadArray = $this->jwt->decode($token->get());

        $payload = $this->payloadFactory->setRefreshFlow($this->refreshFlow)->make($payloadArray);

        if ($this->blacklistEnabled && $this->blacklist->has($payload)) {
            throw new TokenBlacklistedException('The token has been blacklisted');
        }

        return $payload;
    }
812314
@Pure
	@Inline(value = "Base64Coder.decode(($1).toCharArray())", imported = {Base64Coder.class})
	public static byte[] decode(String string) {
		return decode(string.toCharArray());
	}
582175
function(token) {
  if (token === undefined || token === null) {
    return {
      nextPartitionKey: undefined,
      nextRowKey:       undefined,
    };
  }
  assert(typeof token === 'string', 'Continuation token must be a string if ' +
                                     'not undefined');
  // Split at tilde (~)
  token = token.split('~');
  assert(token.length === 2, 'Expected an encoded continuation token with ' +
                             'a single tilde as separator');
  return {
    nextPartitionKey: decodeURIComponent(token[0]),
    nextRowKey:       decodeURIComponent(token[1]),
  };
}
1204129
private Size parseAtomicSize(String token) {
        String trimmedToken = token.trim();
        if (trimmedToken.startsWith("'") && trimmedToken.endsWith("'")) {
            int length = trimmedToken.length();
            if (length < 2) {
                throw new IllegalArgumentException("Missing closing \"'\" for prototype.");
            }
            return new PrototypeSize(trimmedToken.substring(1, length - 1));
        }
        Sizes.ComponentSize componentSize = Sizes.ComponentSize.valueOf(trimmedToken);
        if (componentSize != null) {
            return componentSize;
        }
        return ConstantSize.valueOf(trimmedToken, isHorizontal());
    }
668748
def _decode_token_compact(token):
    
    header, payload, raw_signature, signing_input = _unpack_token_compact(token)
    token = { 
        "header": header,
        "payload": payload,
        "signature": base64url_encode(raw_signature)
    }
    return token
975920
private function decodeToken(string $token): array
    {
        try {
            $decoded = JWT::decode(
                $token,
                $this->options["secret"],
                (array) $this->options["algorithm"]
            );
            return (array) $decoded;
        } catch (Exception $exception) {
            $this->log(LogLevel::WARNING, $exception->getMessage(), [$token]);
            throw $exception;
        }
    }
1326928
@Nonnull
    static String convertStringToPlainAscii(@Nonnull final String string) {
        return Decoder.decodeUTF16(string.toUpperCase());
    }
985261
public function decode($token)
    {
        if (\substr_count($token, '.') < 2) {
            throw new JWTException('Invalid token: Incomplete segments', static::ERROR_TOKEN_INVALID);
        }

        $token = \explode('.', $token, 3);
        $this->validateHeader((array) $this->urlSafeDecode($token[0]));

        // Validate signature.
        if (!$this->verify($token[0] . '.' . $token[1], $token[2])) {
            throw new JWTException('Invalid token: Signature failed', static::ERROR_SIGNATURE_FAILED);
        }

        $payload = (array) $this->urlSafeDecode($token[1]);

        $this->validateTimestamps($payload);

        return $payload;
    }
592362
static String[] splitToken(String token) throws JWTDecodeException {
        String[] parts = token.split("\\.");
        if (parts.length == 2 && token.endsWith(".")) {
            //Tokens with alg='none' have empty String as Signature.
            parts = new String[]{parts[0], parts[1], ""};
        }
        if (parts.length != 3) {
            throw new JWTDecodeException(String.format("The token was expected to have 3 parts, but got %s.", parts.length));
        }
        return parts;
    }
1059965
public static String encode(final String decoded) {
        try {
            return s_codec.encode(decoded);
        } catch (EncoderException e) {
            throw new IllegalStateException(Bundle.getErrorString("URLCodec_encodeException", new String[] {e.getMessage()}), e);
        }
    }