Class WSSecurityUtil

java.lang.Object
com.landawn.abacus.util.WSSecurityUtil

public final class WSSecurityUtil extends Object

Note: it's copied from Apache WSS4J developed at The Apache Software Foundation (http://www.apache.org/), or under the Apache License 2.0. The methods copied from other products/frameworks may be modified in this class.

WS-Security Utility methods.

Author:
Davanum Srinivas ([email protected]).
  • Method Details

    • generateNonce

      public static byte[] generateNonce(int length)
      Generate a nonce of the given length using the SHA1PRNG algorithm. The SecureRandom instance that backs this method is cached for efficiency.
      Parameters:
      length -
      Returns:
      a nonce of the given length
    • generateDigest

      public static byte[] generateDigest(byte[] inputBytes)
      Generate a (SHA1) digest of the input bytes. The MessageDigest instance that backs this method is cached for efficiency.
      Parameters:
      inputBytes - the bytes to digest
      Returns:
    • doPasswordDigest

      public static String doPasswordDigest(byte[] nonce, byte[] created, byte[] password)
      Do password digest.
      Parameters:
      nonce -
      created -
      password -
      Returns:
    • doPasswordDigest

      public static String doPasswordDigest(String nonce, String created, String password)
      Do password digest.
      Parameters:
      nonce -
      created -
      password -
      Returns: