Tabnine Logo
DigestScheme.encode
Code IndexAdd Tabnine to your IDE (free)

How to use
encode
method
in
org.apache.commons.httpclient.auth.DigestScheme

Best Java code snippets using org.apache.commons.httpclient.auth.DigestScheme.encode (Showing top 10 results out of 315)

origin: commons-httpclient/commons-httpclient

  /**
   * Creates a random cnonce value based on the current time.
   * 
   * @return The cnonce value as String.
   * @throws HttpClientError if MD5 algorithm is not supported.
   */
  public static String createCnonce() {
    LOG.trace("enter DigestScheme.createCnonce()");

    String cnonce;
    final String digAlg = "MD5";
    MessageDigest md5Helper;

    try {
      md5Helper = MessageDigest.getInstance(digAlg);
    } catch (NoSuchAlgorithmException e) {
      throw new HttpClientError(
       "Unsupported algorithm in HTTP Digest authentication: "
        + digAlg);
    }

    cnonce = Long.toString(System.currentTimeMillis());
    cnonce = encode(md5Helper.digest(EncodingUtil.getAsciiBytes(cnonce)));

    return cnonce;
  }
}
origin: commons-httpclient/commons-httpclient

  String tmp2=encode(md5Helper.digest(EncodingUtil.getBytes(a1, charset)));
  StringBuffer tmp3 = new StringBuffer(tmp2.length() + nonce.length() + cnonce.length() + 2);
  tmp3.append(tmp2);
  LOG.warn("Unhandled algorithm " + algorithm + " requested");
String md5a1 = encode(md5Helper.digest(EncodingUtil.getBytes(a1, charset)));
  a2 = method + ":" + uri;
String md5a2 = encode(md5Helper.digest(EncodingUtil.getAsciiBytes(a2)));
  encode(md5Helper.digest(EncodingUtil.getAsciiBytes(serverDigestValue)));
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

  /**
   * Creates a random cnonce value based on the current time.
   * 
   * @return The cnonce value as String.
   * @throws HttpClientError if MD5 algorithm is not supported.
   */
  public static String createCnonce() {
    LOG.trace("enter DigestScheme.createCnonce()");

    String cnonce;
    final String digAlg = "MD5";
    MessageDigest md5Helper;

    try {
      md5Helper = MessageDigest.getInstance(digAlg);
    } catch (NoSuchAlgorithmException e) {
      throw new HttpClientError(
       "Unsupported algorithm in HTTP Digest authentication: "
        + digAlg);
    }

    cnonce = Long.toString(System.currentTimeMillis());
    cnonce = encode(md5Helper.digest(EncodingUtil.getAsciiBytes(cnonce)));

    return cnonce;
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

  /**
   * Creates a random cnonce value based on the current time.
   * 
   * @return The cnonce value as String.
   * @throws HttpClientError if MD5 algorithm is not supported.
   */
  public static String createCnonce() {
    LOG.trace("enter DigestScheme.createCnonce()");

    String cnonce;
    final String digAlg = "MD5";
    MessageDigest md5Helper;

    try {
      md5Helper = MessageDigest.getInstance(digAlg);
    } catch (NoSuchAlgorithmException e) {
      throw new HttpClientError(
       "Unsupported algorithm in HTTP Digest authentication: "
        + digAlg);
    }

    cnonce = Long.toString(System.currentTimeMillis());
    cnonce = encode(md5Helper.digest(EncodingUtil.getAsciiBytes(cnonce)));

    return cnonce;
  }
}
origin: org.apache.commons/httpclient

  /**
   * Creates a random cnonce value based on the current time.
   * 
   * @return The cnonce value as String.
   * @throws HttpClientError if MD5 algorithm is not supported.
   */
  public static String createCnonce() {
    LOG.trace("enter DigestScheme.createCnonce()");

    String cnonce;
    final String digAlg = "MD5";
    MessageDigest md5Helper;

    try {
      md5Helper = MessageDigest.getInstance(digAlg);
    } catch (NoSuchAlgorithmException e) {
      throw new HttpClientError(
       "Unsupported algorithm in HTTP Digest authentication: "
        + digAlg);
    }

    cnonce = Long.toString(System.currentTimeMillis());
    cnonce = encode(md5Helper.digest(EncodingUtil.getAsciiBytes(cnonce)));

    return cnonce;
  }
}
origin: org.wso2.commons-httpclient/commons-httpclient

  /**
   * Creates a random cnonce value based on the current time.
   * 
   * @return The cnonce value as String.
   * @throws HttpClientError if MD5 algorithm is not supported.
   */
  public static String createCnonce() {
    LOG.trace("enter DigestScheme.createCnonce()");

    String cnonce;
    final String digAlg = "MD5";
    MessageDigest md5Helper;

    try {
      md5Helper = MessageDigest.getInstance(digAlg);
    } catch (NoSuchAlgorithmException e) {
      throw new HttpClientError(
       "Unsupported algorithm in HTTP Digest authentication: "
        + digAlg);
    }

    cnonce = Long.toString(System.currentTimeMillis());
    cnonce = encode(md5Helper.digest(EncodingUtil.getAsciiBytes(cnonce)));

    return cnonce;
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

  String tmp2=encode(md5Helper.digest(EncodingUtil.getBytes(a1, charset)));
  StringBuffer tmp3 = new StringBuffer(tmp2.length() + nonce.length() + cnonce.length() + 2);
  tmp3.append(tmp2);
  LOG.warn("Unhandled algorithm " + algorithm + " requested");
String md5a1 = encode(md5Helper.digest(EncodingUtil.getBytes(a1, charset)));
  a2 = method + ":" + uri;
String md5a2 = encode(md5Helper.digest(EncodingUtil.getAsciiBytes(a2)));
  encode(md5Helper.digest(EncodingUtil.getAsciiBytes(serverDigestValue)));
origin: org.wso2.commons-httpclient/commons-httpclient

  String tmp2=encode(md5Helper.digest(EncodingUtil.getBytes(a1, charset)));
  StringBuffer tmp3 = new StringBuffer(tmp2.length() + nonce.length() + cnonce.length() + 2);
  tmp3.append(tmp2);
  LOG.warn("Unhandled algorithm " + algorithm + " requested");
String md5a1 = encode(md5Helper.digest(EncodingUtil.getBytes(a1, charset)));
  a2 = method + ":" + uri;
String md5a2 = encode(md5Helper.digest(EncodingUtil.getAsciiBytes(a2)));
  encode(md5Helper.digest(EncodingUtil.getAsciiBytes(serverDigestValue)));
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

  String tmp2=encode(md5Helper.digest(EncodingUtil.getBytes(a1, charset)));
  StringBuffer tmp3 = new StringBuffer(tmp2.length() + nonce.length() + cnonce.length() + 2);
  tmp3.append(tmp2);
  LOG.warn("Unhandled algorithm " + algorithm + " requested");
String md5a1 = encode(md5Helper.digest(EncodingUtil.getBytes(a1, charset)));
  a2 = method + ":" + uri;
String md5a2 = encode(md5Helper.digest(EncodingUtil.getAsciiBytes(a2)));
  encode(md5Helper.digest(EncodingUtil.getAsciiBytes(serverDigestValue)));
origin: org.apache.commons/httpclient

  String tmp2=encode(md5Helper.digest(EncodingUtil.getBytes(a1, charset)));
  StringBuffer tmp3 = new StringBuffer(tmp2.length() + nonce.length() + cnonce.length() + 2);
  tmp3.append(tmp2);
  LOG.warn("Unhandled algorithm " + algorithm + " requested");
String md5a1 = encode(md5Helper.digest(EncodingUtil.getBytes(a1, charset)));
  a2 = method + ":" + uri;
String md5a2 = encode(md5Helper.digest(EncodingUtil.getAsciiBytes(a2)));
  encode(md5Helper.digest(EncodingUtil.getAsciiBytes(serverDigestValue)));
org.apache.commons.httpclient.authDigestSchemeencode

Javadoc

Encodes the 128 bit (16 bytes) MD5 digest into a 32 characters long String according to RFC 2617.

Popular methods of DigestScheme

  • <init>
    Constructor for the digest authetication scheme.
  • createCnonce
    Creates a random cnonce value based on the current time.
  • createDigest
    Creates an MD5 response digest.
  • createDigestHeader
    Creates digest-response header as defined in RFC2617.
  • getParameter
  • getParameters
  • getQopVariantString
  • getRealm
  • processChallenge
    Processes the Digest challenge.

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • getSystemService (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • IsNull (org.hamcrest.core)
    Is the value null?
  • 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