EVP_MDC2(3ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

πŸ’… EVP_MDC2 πŸ’…

okay so bestie, you're looking at the EVP_MDC2(3ossl) page from the OpenSSL manual β€” like, yes, that whole manual. Don't worry, this one's short and honestly kind of iconic. Let's get into it ✨


πŸŽ€ NAME πŸŽ€

EVP_mdc2 β€” MDC-2 For EVP. that's it, that's the whole name. short king energy πŸ‘‘


🌸 SYNOPSIS 🌸

#include <openssl/evp.h>

const EVP_MD *EVP_mdc2(void);

literally just one include and one function call. we love a minimal queen 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so MDC-2 (that's Modification Detection Code 2, a.k.a. Meyer-Schilling, and yes it has two names because it's that girl) is a cryptographic hash function based on a block cipher. cute, right?

πŸ’€ real talk though: this implementation is only available with the legacy provider. so if you're not pulling in the legacy provider, this is gonna be a whole "who is she" moment and the function won't be there. plan accordingly bestie.

EVP_mdc2()

this is the MDC-2DES algorithm β€” which is just MDC-2 paired up with the DES block cipher, they're a package deal 🎁

it produces a 128-bit output from a given input. 128 bits! iconic length! no cap πŸ’–


⭐ NOTES ⭐

okay listen, actual important stuff here πŸ™ˆ

developers should be aware of the negative performance implications of calling this function multiple times β€” like, don't spam it, it's not a group chat message. instead, you should consider using EVP_MD_fetch(3) with EVP_MD-MDC2(7). that's the move.

and if you want even more deets, see "Performance" in crypto(7) for further information. iykyk πŸ”₯


πŸ’œ RETURN VALUES πŸ’œ

these functions return a EVP_MD structure that contains the implementation of the message digest. that's your prize πŸ†

if you want the details of the EVP_MD structure, see EVP_MD_meth_new(3). go read up, bestie 🌈


πŸ‘‘ CONFORMING TO πŸ‘‘

ISO/IEC 10118-2:2000 Hash-Function 2, with DES as the underlying block cipher. she's certified! she's standardized! periodt πŸ’…


πŸ“ SEE ALSO πŸ“


Copyright 2017-2023 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.

🫢 yes, you have to actually comply with the license. it's giving legally binding but make it cute.

and that's the whole page, bestie! πŸ’– this was OpenSSL 3.5.6, dated 2026-04-07, and honestly? she ate. go forth and hash responsibly ✨🧚

πŸ“¦ where this page comes from