Package org.apache.wookie.exceptions

Examples of org.apache.wookie.exceptions.SystemUnavailableException


    MessageDigest md = null;
    try {
      md = MessageDigest.getInstance(_algorithm);
    }
    catch (NoSuchAlgorithmException e) {
      throw new SystemUnavailableException(e.getMessage());
    }
    try {
      md.update(plaintext.getBytes("UTF-8"));
    }
    catch (UnsupportedEncodingException e) {
      throw new SystemUnavailableException(e.getMessage());
    }

    byte raw[] = md.digest(); //step 4
    String hash = new String((new Base64()).encode(raw));
    return hash; //step 6
View Full Code Here

TOP

Related Classes of org.apache.wookie.exceptions.SystemUnavailableException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.