Tabnine Logo
NTLM.getCipher
Code IndexAdd Tabnine to your IDE (free)

How to use
getCipher
method
in
org.apache.commons.httpclient.auth.NTLM

Best Java code snippets using org.apache.commons.httpclient.auth.NTLM.getCipher (Showing top 5 results out of 315)

origin: commons-httpclient/commons-httpclient

/**
 * Encrypt the data.
 * @param key The key.
 * @param bytes The data
 * @return byte[] The encrypted data
 * @throws HttpException If {@link Cipher.doFinal(byte[])} fails
 */
private byte[] encrypt(byte[] key, byte[] bytes)
  throws AuthenticationException {
  Cipher ecipher = getCipher(key);
  try {
    byte[] enc = ecipher.doFinal(bytes);
    return enc;
  } catch (IllegalBlockSizeException e) {
    throw new AuthenticationException("Invalid block size for DES encryption.", e);
  } catch (BadPaddingException e) {
    throw new AuthenticationException("Data not padded correctly for DES encryption.", e);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Encrypt the data.
 * @param key The key.
 * @param bytes The data
 * @return byte[] The encrypted data
 * @throws HttpException If {@link Cipher.doFinal(byte[])} fails
 */
private byte[] encrypt(byte[] key, byte[] bytes)
  throws AuthenticationException {
  Cipher ecipher = getCipher(key);
  try {
    byte[] enc = ecipher.doFinal(bytes);
    return enc;
  } catch (IllegalBlockSizeException e) {
    throw new AuthenticationException("Invalid block size for DES encryption.", e);
  } catch (BadPaddingException e) {
    throw new AuthenticationException("Data not padded correctly for DES encryption.", e);
  }
}
origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Encrypt the data.
 * @param key The key.
 * @param bytes The data
 * @return byte[] The encrypted data
 * @throws HttpException If {@link Cipher.doFinal(byte[])} fails
 */
private byte[] encrypt(byte[] key, byte[] bytes)
  throws AuthenticationException {
  Cipher ecipher = getCipher(key);
  try {
    byte[] enc = ecipher.doFinal(bytes);
    return enc;
  } catch (IllegalBlockSizeException e) {
    throw new AuthenticationException("Invalid block size for DES encryption.", e);
  } catch (BadPaddingException e) {
    throw new AuthenticationException("Data not padded correctly for DES encryption.", e);
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Encrypt the data.
 * @param key The key.
 * @param bytes The data
 * @return byte[] The encrypted data
 * @throws HttpException If {@link Cipher.doFinal(byte[])} fails
 */
private byte[] encrypt(byte[] key, byte[] bytes)
  throws AuthenticationException {
  Cipher ecipher = getCipher(key);
  try {
    byte[] enc = ecipher.doFinal(bytes);
    return enc;
  } catch (IllegalBlockSizeException e) {
    throw new AuthenticationException("Invalid block size for DES encryption.", e);
  } catch (BadPaddingException e) {
    throw new AuthenticationException("Data not padded correctly for DES encryption.", e);
  }
}
origin: org.apache.commons/httpclient

/**
 * Encrypt the data.
 * @param key The key.
 * @param bytes The data
 * @return byte[] The encrypted data
 * @throws HttpException If {@link Cipher.doFinal(byte[])} fails
 */
private byte[] encrypt(byte[] key, byte[] bytes)
  throws AuthenticationException {
  Cipher ecipher = getCipher(key);
  try {
    byte[] enc = ecipher.doFinal(bytes);
    return enc;
  } catch (IllegalBlockSizeException e) {
    throw new AuthenticationException("Invalid block size for DES encryption.", e);
  } catch (BadPaddingException e) {
    throw new AuthenticationException("Data not padded correctly for DES encryption.", e);
  }
}
org.apache.commons.httpclient.authNTLMgetCipher

Javadoc

Return the cipher for the specified key.

Popular methods of NTLM

  • <init>
  • addByte
    Adds the given byte to the response.
  • addBytes
    Adds the given bytes to the response.
  • calcResp
    Takes a 21 byte array and treats it as 3 56-bit DES keys. The 8 byte plaintext is encrypted with eac
  • convertShort
    Converts a given number to a two byte array in little endian order.
  • encrypt
    Encrypt the data.
  • getResponse
    Returns the response that has been generated after shrinking the array if required and base64 encode
  • getResponseFor
    Returns the response for the given message.
  • getType1Message
    Creates the first message (type 1 message) in the NTLM authentication sequence. This message include
  • getType3Message
    Creates the type 3 message using the given server nonce. The type 3 message includes all the informa
  • hashPassword
    Creates the LANManager and NT response for the given password using the given nonce.
  • parseType2Message
    Extracts the server nonce out of the given message type 2.
  • hashPassword,
  • parseType2Message,
  • prepareResponse,
  • setCredentialCharset,
  • setupKey

Popular in Java

  • Running tasks concurrently on multiple threads
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • getContentResolver (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Collectors (java.util.stream)
  • Top PhpStorm 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