package org.traccar.helper; import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Hashing { public static byte[] sha256(String text) { try { MessageDigest md = MessageDigest.getInstance("SHA-256"); md.update(text.getBytes(StandardCharsets.UTF_8)); return md.digest(); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } } }