Tabnine Logo
ByteIterator.hexEncode
Code IndexAdd Tabnine to your IDE (free)

How to use
hexEncode
method
in
org.wildfly.security.util.ByteIterator

Best Java code snippets using org.wildfly.security.util.ByteIterator.hexEncode (Showing top 6 results out of 315)

origin: wildfly/wildfly

/**
 * Hex-encode the current stream.
 *
 * @return an iterator over the encoded characters
 */
public CodePointIterator hexEncode() {
  return hexEncode(false);
}
origin: wildfly/wildfly

  @Override
  public boolean verifyCertificate(X509Certificate certificate, Attributes attributes) throws NamingException, RealmUnavailableException {
    Attribute attribute = attributes.get(ldapAttribute);
    if (attribute == null) return false;
    final int size = attribute.size();
    try {
      MessageDigest md = MessageDigest.getInstance(algorithm);
      String digest = ByteIterator.ofBytes(md.digest(certificate.getEncoded())).hexEncode(true).drainToString();
      for (int i = 0; i < size; i++) {
        Object attrDigest = attribute.get(i);
        if (attrDigest != null){
          if (digest.equalsIgnoreCase((String) attrDigest)) {
            return true;
          }
        }
      }
    } catch (NoSuchAlgorithmException | CertificateEncodingException e) {
      throw new RealmUnavailableException(e);
    }
    return false;
  }
}
origin: org.wildfly.security/wildfly-elytron

/**
 * Hex-encode the current stream.
 *
 * @return an iterator over the encoded characters
 */
public CodePointIterator hexEncode() {
  return hexEncode(false);
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Hex-encode the current stream.
 *
 * @return an iterator over the encoded characters
 */
public CodePointIterator hexEncode() {
  return hexEncode(false);
}
origin: org.wildfly.security/wildfly-elytron

  @Override
  public boolean verifyCertificate(X509Certificate certificate, Attributes attributes) throws NamingException, RealmUnavailableException {
    Attribute attribute = attributes.get(ldapAttribute);
    if (attribute == null) return false;
    final int size = attribute.size();
    try {
      MessageDigest md = MessageDigest.getInstance(algorithm);
      String digest = ByteIterator.ofBytes(md.digest(certificate.getEncoded())).hexEncode(true).drainToString();
      for (int i = 0; i < size; i++) {
        Object attrDigest = attribute.get(i);
        if (attrDigest != null){
          if (digest.equalsIgnoreCase((String) attrDigest)) {
            return true;
          }
        }
      }
    } catch (NoSuchAlgorithmException | CertificateEncodingException e) {
      throw new RealmUnavailableException(e);
    }
    return false;
  }
}
origin: org.jboss.eap/wildfly-client-all

  @Override
  public boolean verifyCertificate(X509Certificate certificate, Attributes attributes) throws NamingException, RealmUnavailableException {
    Attribute attribute = attributes.get(ldapAttribute);
    if (attribute == null) return false;
    final int size = attribute.size();
    try {
      MessageDigest md = MessageDigest.getInstance(algorithm);
      String digest = ByteIterator.ofBytes(md.digest(certificate.getEncoded())).hexEncode(true).drainToString();
      for (int i = 0; i < size; i++) {
        Object attrDigest = attribute.get(i);
        if (attrDigest != null){
          if (digest.equalsIgnoreCase((String) attrDigest)) {
            return true;
          }
        }
      }
    } catch (NoSuchAlgorithmException | CertificateEncodingException e) {
      throw new RealmUnavailableException(e);
    }
    return false;
  }
}
org.wildfly.security.utilByteIteratorhexEncode

Javadoc

Hex-encode the current stream.

Popular methods of ByteIterator

  • asUtf8String
    Get this byte iterator as a UTF-8 string.
  • drain
    Drains up to len bytes from this iterator into the given dst array. An attempt is made to drain as m
  • ofBytes
    Get a byte iterator for a byte array with interleave.
  • appendTo
  • asLatin1String
    Get this byte iterator as a Latin-1 string.
  • base32Encode
    Base32-encode the current stream.
  • base64Encode
    Base64-encode the current stream.
  • drainTo
    Drain all the remaining bytes in this iterator to the given stream.
  • hasNext
    Determine if there are more bytes after the current byte.
  • hasPrev
    Determine if there are more bytes before the current byte.
  • next
    Get the next byte.
  • offset
    Get the current offset, in bytes.
  • next,
  • offset,
  • peekNext,
  • peekPrev,
  • prev,
  • update,
  • hexDecode

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Permission (java.security)
    Legacy security code; do not use.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Best IntelliJ 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