Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 192f297d

Přidáno uživatelem Jiri Trefil před asi 2 roky(ů)

#10244 bug fix vytvareni hashe

Zobrazit rozdíly:

src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/v2/service/UserServiceImpl.java
6 6
import org.springframework.beans.factory.annotation.Autowired;
7 7
import org.springframework.stereotype.Service;
8 8

  
9
import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
9 10
import java.nio.charset.StandardCharsets;
10 11
import java.security.MessageDigest;
11 12
import java.security.NoSuchAlgorithmException;
......
97 98
            return null;
98 99
        }
99 100
        byte [] tmp = digest.digest(password.getBytes(StandardCharsets.UTF_8));
100
        return new String(tmp,StandardCharsets.UTF_8);
101
        //convert byte array into string
102
        return (new HexBinaryAdapter()).marshal(tmp);
101 103
    }
102 104

  
103 105
    /**

Také k dispozici: Unified diff