// Path: encoder/src/main/java/ru/bullyboo/encoder/constants/Constants.java
// public class Constants {
// 
//     /**
//      * Exceptions messages
//      */
//     public static final String MESSAGE_EXCEPTION = "Message was not set";
//     public static final String METHOD_EXCEPTION = "Method was not set";
//     public static final String METHOD_CFB_OFB_EXCEPTION = "Wrong method number. Set the method number between 8 and 128";
//     public static final String KEY_SIZE_EXCEPTION = "Key size can`t be equal to 0";
//     public static final String LESS_ZERO_KEY_SIZE_EXCEPTION = "Key size can`t be less than 0";
// 
//     public static final String RSA_KEY_EXCEPTION = "Wrong key size value. Set the key size between 512 and 65536";
//     public static final String RSA_KEY_MULTIPLY_EXCEPTION = "Wrong key size value. Key must be a multiple of 64";
//     public static final String RSA_KEY_CALLBACK_EXCEPTION = "Key Callback was not set";
//     public static final String RSA_HAS_NOT_KEY_EXCEPTION = "Private key was not set. Try to use privateKey() or key() methods";
//     public static final String RSA_KEY_SIZE_EXCEPTION = "Key size was not set";
// 
//     public static final String PBE_KEY_SIZE_EXCEPTION = "Key size is not valid. Key size must be: ";
// 
// }
// 
// Path: encoder/src/main/java/ru/bullyboo/encoder/methods/HMAC.java
// public class HMAC {
// 
//     /**
//      * All supported methods
//      */
//     public enum Method{
// 
//         HMAC_MD5("HMAC-MD5"),
//         HMAC_SHA_1("HMAC-SHA1"),
//         HMAC_SHA_224("HMAC-SHA224"),
//         HMAC_SHA_256("HMAC-SHA256"),
//         HMAC_SHA_384("HMAC-SHA384"),
//         HMAC_SHA_512("HMAC-SHA512");
// 
// 
//         private final String method;
// 
//         Method(String method) {
//             this.method = method;
//         }
// 
//         public String getMethod() {
//             return method;
//         }
// 
//     }
// 
//     /**
//      * Implementation of HMAC encryption
//      */
//     public static String encrypt(HMAC.Method method, byte[] key, byte[] message) throws Exception{
// 
//         SecretKeySpec keySpec = new SecretKeySpec(key, method.getMethod());
// 
//         Mac cipher = Mac.getInstance(method.getMethod());
//         cipher.init(keySpec);
//         byte[] cipherText = cipher.doFinal(message);
// 
//         StringBuffer hash = new StringBuffer();
//         for (int i = 0; i < cipherText.length; i++) {
//             String hex = Integer.toHexString(0xFF & cipherText[i]);
//             if (hex.length() == 1) {
//                 hash.append('0');
//             }
//             hash.append(hex);
//         }
// 
//         return hash.toString();
//     }
// 
// }


import ru.bullyboo.encoder.constants.Constants;
import ru.bullyboo.encoder.methods.HMAC;
        this.key = key;
        return this;
    }

    /**
     * HMAC encryption method doesn`t support decryption
     */
    @Deprecated
    public String decrypt() {
        return super.decrypt();
    }

    @Deprecated
    public void decryptAsync() {
        return;
    }

    @Override
    String encryption() throws Exception {
        return HMAC.encrypt(method, key, message);
    }

    @Deprecated
    String decryption() throws Exception {
        throw new NoSuchMethodError();
    }

    @Override
    boolean hasEnoughData() {
        if(method == null){
// Path: encoder/src/main/java/ru/bullyboo/encoder/constants/Constants.java
// public class Constants {
// 
//     /**
//      * Exceptions messages
//      */
//     public static final String MESSAGE_EXCEPTION = "Message was not set";
//     public static final String METHOD_EXCEPTION = "Method was not set";
//     public static final String METHOD_CFB_OFB_EXCEPTION = "Wrong method number. Set the method number between 8 and 128";
//     public static final String KEY_SIZE_EXCEPTION = "Key size can`t be equal to 0";
//     public static final String LESS_ZERO_KEY_SIZE_EXCEPTION = "Key size can`t be less than 0";
// 
//     public static final String RSA_KEY_EXCEPTION = "Wrong key size value. Set the key size between 512 and 65536";
//     public static final String RSA_KEY_MULTIPLY_EXCEPTION = "Wrong key size value. Key must be a multiple of 64";
//     public static final String RSA_KEY_CALLBACK_EXCEPTION = "Key Callback was not set";
//     public static final String RSA_HAS_NOT_KEY_EXCEPTION = "Private key was not set. Try to use privateKey() or key() methods";
//     public static final String RSA_KEY_SIZE_EXCEPTION = "Key size was not set";
// 
//     public static final String PBE_KEY_SIZE_EXCEPTION = "Key size is not valid. Key size must be: ";
// 
// }
// 
// Path: encoder/src/main/java/ru/bullyboo/encoder/methods/HMAC.java
// public class HMAC {
// 
//     /**
//      * All supported methods
//      */
//     public enum Method{
// 
//         HMAC_MD5("HMAC-MD5"),
//         HMAC_SHA_1("HMAC-SHA1"),
//         HMAC_SHA_224("HMAC-SHA224"),
//         HMAC_SHA_256("HMAC-SHA256"),
//         HMAC_SHA_384("HMAC-SHA384"),
//         HMAC_SHA_512("HMAC-SHA512");
// 
// 
//         private final String method;
// 
//         Method(String method) {
//             this.method = method;
//         }
// 
//         public String getMethod() {
//             return method;
//         }
// 
//     }
// 
//     /**
//      * Implementation of HMAC encryption
//      */
//     public static String encrypt(HMAC.Method method, byte[] key, byte[] message) throws Exception{
// 
//         SecretKeySpec keySpec = new SecretKeySpec(key, method.getMethod());
// 
//         Mac cipher = Mac.getInstance(method.getMethod());
//         cipher.init(keySpec);
//         byte[] cipherText = cipher.doFinal(message);
// 
//         StringBuffer hash = new StringBuffer();
//         for (int i = 0; i < cipherText.length; i++) {
//             String hex = Integer.toHexString(0xFF & cipherText[i]);
//             if (hex.length() == 1) {
//                 hash.append('0');
//             }
//             hash.append(hex);
//         }
// 
//         return hash.toString();
//     }
// 
// }


// Path: encoder/src/main/java/ru/bullyboo/encoder/builders/BuilderHMAC.java
import ru.bullyboo.encoder.constants.Constants;
import ru.bullyboo.encoder.methods.HMAC;

        this.key = key;
        return this;
    }

    /**
     * HMAC encryption method doesn`t support decryption
     */
    @Deprecated
    public String decrypt() {
        return super.decrypt();
    }

    @Deprecated
    public void decryptAsync() {
        return;
    }

    @Override
    String encryption() throws Exception {
        return HMAC.encrypt(method, key, message);
    }

    @Deprecated
    String decryption() throws Exception {
        throw new NoSuchMethodError();
    }

    @Override
    boolean hasEnoughData() {
        if(method == null){
            throw new NullPointerException(Constants.METHOD_EXCEPTION);