Tabnine Logo
JwtUtil.computeSha256Hash
Code IndexAdd Tabnine to your IDE (free)

How to use
computeSha256Hash
method
in
com.atlassian.jwt.core.JwtUtil

Best Java code snippets using com.atlassian.jwt.core.JwtUtil.computeSha256Hash (Showing top 1 results out of 315)

origin: com.atlassian.jwt/jwt-core

/**
 * Canonicalize the given {@link CanonicalHttpRequest} and hash it.
 * This request hash can be included as a JWT claim to verify that request components are genuine.
 * @param request {@link CanonicalHttpRequest} to be canonicalized and hashed
 * @return {@link String} hash suitable for use as a JWT claim value
 * @throws UnsupportedEncodingException if the {@link java.net.URLEncoder} cannot encode the request's field's characters
 * @throws NoSuchAlgorithmException if the hashing algorithm does not exist at runtime
 */
public static String computeCanonicalRequestHash(CanonicalHttpRequest request) throws UnsupportedEncodingException, NoSuchAlgorithmException
{
  // prevent the code in this method being repeated in every call site that needs a request hash,
  // encapsulate the knowledge of the type of hash that we are using
  return JwtUtil.computeSha256Hash(canonicalize(request));
}
com.atlassian.jwt.coreJwtUtilcomputeSha256Hash

Javadoc

Compute the SHA-256 hash of hashInput. E.g. The SHA-256 has of "foo" is "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae".

Popular methods of JwtUtil

  • extractJwt
  • percentEncode
    URLEncoder#encode() but encode some characters differently to URLEncoder, to match OAuth1 and Visual
  • requestContainsJwt

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • JLabel (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top Sublime Text plugins
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