Java XML Hash hashToString(byte[] hash)

Here you can find the source of hashToString(byte[] hash)

Description

hash To String

License

Open Source License

Declaration

public static String hashToString(byte[] hash) 

Method Source Code

//package com.java2s;
/*//from   w  w w  .ja  v  a2 s.c o  m
 * Copyright (C) 2016 Dietmar.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301  USA
 */

public class Main {
    public static String hashToString(byte[] hash) {
        return javax.xml.bind.DatatypeConverter.printHexBinary(hash);
    }
}

Related

  1. hash(String data, String salt)
  2. hash512(byte[] data)
  3. hashPass(String plaintext)
  4. hashPassword(char[] password, String salt, String hashAlgo)
  5. hashPassword(String password)
  6. sha1Hash(String s)
  7. strHash(String value, String method)
  8. validatePassword(String password, String correctHash)