Skip to content

No access to padding in Cipher #3374

Closed
Closed
@micheleselea

Description

We fix the EVP_CIPHER_CTX_set_padding function here, but there no way to use it during decrypt in Cipher. I think should be change Cipher::decrypt something like:

void Cipher::decrypt(std::istream& source, std::ostream& sink, Encoding encoding, int padding)
{
	CryptoTransform::Ptr p = createDecryptor();
	if (padding == 0)
		p->setPadding(0); //disable padding process
	CryptoOutputStream decryptor(sink, p);
...

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions