Sorry for the question but let me explain:
I understand that a hash function performs one-way operations on an element without the possibility of RETURNING the operation from the result.
A symmetric encryption function allows bi-directional operations based on a key, but allowing me to encrypt and decrypt.
So far so good but I have a doubt if it is possible to have a kind of fusion between the two and thus have an algorithm that encrypts symmetrically but resulting in a unique "hash". In other words, having something that allows me to encrypt a large amount of information based on a key and resulting in a FIXED LENGTH code just like md5 does.
Is this really possible?
Thank you very much.
One of the main principles of hashing functions is that they are not invertible. This means that once the message signature is obtained, it is not possible to obtain the message from it. Therefore, answering your question; no, it is not possible, since in any encryption it is necessary that the encryption algorithm be invertible, as is the case with rsa, or any symmetric encryption.
The hash function guarantees the integrity of the messages, not confidentiality. You have to be very clear about this and understand that they are different concepts.