HMAC Sha3-384 Generator Online

Generate hmac with SHA3-384 algorithm

Enter the Plain or Cipher Text to convert to hash mac (HMAC) SHA3-384

The HMAC SHA3-384 generator tool available on Codezi.pro is designed to make it easy for programmers to generate unique and secure hash codes for their data. All the user needs to do is input their message and a secret key into the tool and click "Generate Hash Code" to get their MAC. This tool is fast, reliable, and easy to use, making it a great option for programmers who need to quickly generate secure hash codes for their data.

The Codezi.pro HMAC SHA3-384 generator tool is designed to be user-friendly and accessible to a wide range of users. It requires no special technical knowledge or experience, and it is available for free to anyone who needs it. By using this tool, users can generate secure hash codes for their data in a matter of seconds, giving them peace of mind that their information is protected against cyber threats.

What is HMAC SHA3-384?

HMAC SHA3-384 is a cryptographic algorithm that provides message authentication by combining a secret key with a hash function. The algorithm is a variant of the HMAC (Keyed-Hashing for Message Authentication) algorithm, which is widely used to verify the integrity and authenticity of data.

The SHA3-384 hash function is a member of the SHA-3 (Secure Hash Algorithm 3) family of cryptographic hash functions. It produces a 384-bit hash value for an input message, which is then combined with a secret key using the HMAC algorithm to produce a fixed-length message authentication code (MAC).

The HMAC SHA3-384 algorithm is designed to be highly secure and resistant to attacks, making it an ideal choice for applications that require high levels of security and message integrity. It is commonly used in secure communication protocols, digital signatures, and cryptographic key exchange.

To use the HMAC SHA3-384 algorithm, a user needs to provide a message and a secret key. The message can be any data, while the secret key should be a unique key that is known only to the user. The HMAC SHA3-384 algorithm then produces a fixed-length MAC that is unique to the message and secret key, which can be used to verify the integrity and authenticity of the message.

Overall, the HMAC SHA3-384 algorithm is a highly secure method of providing message authentication. It combines the SHA3-384 hash function with the HMAC algorithm to produce a fixed-length MAC that can be used to verify the integrity and authenticity of data. The algorithm is widely used in secure communication protocols, digital signatures, and cryptographic key exchange, making it an essential tool for developers working on secure applications.

Source code example

Example in Php

function HMACSHA3384InPHP($key, $data) {
    $hashKey = hash_hmac('sha3-384', $key, $data);
    return $hashKey;
}

Example in Nodejs

function HMACSHA3384InNodeJS(key, data) {
    const hashKey = crypto.createHmac('sha3-384', key).update(data).digest('hex');
    return hashKey;
}

Example in Java

public static String HMACSHA3384InJava(String key, String data) 
        throws Exception {
        Mac sha3_384Mac = Mac.getInstance("HmacSHA3-384");
        SecretKeySpec secretKey = new SecretKeySpec(key.getBytes("UTF-8"), "HmacSHA3-384");
        sha3_384Mac.init(secretKey);
        byte[] macData = sha3_384Mac.doFinal(data.getBytes("UTF-8"));
        return Base64.encodeBase64String(macData);
    }

Example in C

unsigned char *HMACSHA3384InC(unsigned char *key, unsigned char *data) {
    unsigned char *hashKey;
    hashKey = HMAC(EVP_sha3_384(), key, strlen((const char*)key), data, strlen((const char*)data), NULL, NULL);
    return hashKey;
}

Example in C++

std::string HMACSHA3384InCpp(const std::string &key, const std::string &data) {
    unsigned char hashKey[EVP_MAX_MD_SIZE];
    unsigned int hashKeyLen;
    HMAC_CTX *ctx = HMAC_CTX_new();
    HMAC_Init_ex(ctx, key.c_str(), key.size(), EVP_sha3_384(), NULL);
    HMAC_Update(ctx, data.c_str(), data.size());
    HMAC_Final(ctx, hashKey, &hashKeyLen);
    HMAC_CTX_free(ctx);
    return std::string(hashKey, hashKey + hashKeyLen);
}

Example in C#

public static string HMACSHA3384InCSharp(string key, string data) {
    using (HMACSHA3 hmacsha3_384 = new HMACSHA3(Encoding.UTF8.GetBytes(key))) {
        byte[] hashKey = hmacsha3_384.ComputeHash(Encoding.UTF8.GetBytes(data));
        return Convert.ToBase64String(hashKey);
    }
}

Example in Python

def HMACSHA3384InPython(key, data):
    hashKey = hmac.new(key.encode('utf-8'), data.encode('utf-8'), 'sha3-384').hexdigest()
    return hashKey

Example in Golang

func HMACSHA3384InGo(key string, data string) string {
    hashKey := hmac.New(sha3.New384, []byte(key))
    hashKey.Write([]byte(data))
    return hex.EncodeToString(hashKey.Sum(nil))
}

Example in Dart

String HMACSHA3384InDart(String key, String data) {
    var hashKey = Hmac(sha3.sha3_384, utf8.encode(key)).convert(utf8.encode(data)).toString();
    return hashKey;
}

Example in Kotlin

fun HMACSHA3384InKotlin(key: String, data: String) : String {
    val hashKey = hmac("HmacSHA3-384", key.toByteArray(), data.toByteArray()).toHexString()
    return hashKey
}

Example in Swift

func HMACSHA3384InSwift(key: String, data: String) -> String {
    let hashKey = HMAC(algorithm: .sha3_384, key: key.data(using: .utf8)!, data: data.data(using: .utf8)!).toHexString()
    return hashKey
}