<commit_before>package de.bornemisza.security;

import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;

import javax.annotation.PostConstruct;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;

public abstract class HashProvider {

    private static final String algorithm = "HmacSHA256";
    private Mac mac;

    public HashProvider() {
    }

    protected abstract char[] getServerSecret();

    @PostConstruct
    protected void init() {
        try {
            SecretKeySpec key = new SecretKeySpec(toBytes(getServerSecret()), algorithm);<commit_msg>mask password<commit_after>package de.bornemisza.security;

import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;

import javax.annotation.PostConstruct;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;

public abstract class HashProvider {

    private static final String algorithm = "HmacSHA256";
    private Mac mac;

    public HashProvider() {
    }

    protected abstract char[] getServerSecret();

    @PostConstruct
    protected void init() {
        try {
            char[] serverSecret = getServerSecret();
            SecretKeySpec key = new SecretKeySpec(toBytes(serverSecret), algorithm);
            Arrays.fill(serverSecret, '*');
{'fraction_non_alphanumeric': 0.0897908979089791, 'fraction_numerical': 0.0036900369003690036, 'mean_word_length': 4.334426229508197, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3634006', 'n_tokens_mistral': 445, 'n_tokens_neox': 431, 'n_words': 106}