(String raw)
| 421 | } |
| 422 | |
| 423 | public static String hashKey(String raw) throws NoSuchAlgorithmException { |
| 424 | // Use SHA-256 |
| 425 | MessageDigest digest = MessageDigest.getInstance("SHA-256"); |
| 426 | byte[] hash = digest.digest(raw.getBytes(StandardCharsets.UTF_8)); |
| 427 | return Base64.getEncoder().encodeToString(hash); |
| 428 | } |
| 429 | } |
no test coverage detected