# Poco::Crypto

# class DigestEngine

Library: Crypto
Package: Digest
Header: Poco/Crypto/DigestEngine.h

## Description

This class implements a Poco::DigestEngine for all digest algorithms supported by OpenSSL.

## Inheritance

Direct Base Classes: Poco::DigestEngine

All Base Classes: Poco::DigestEngine

## Member Summary

Member Functions: algorithm, digest, digestLength, reset, updateImpl

Inherited Functions: digest, digestLength, digestToHex, reset, update, updateImpl

## Constructors

### DigestEngine

DigestEngine(
const std::string & name
);

Creates a DigestEngine using the digest with the given name (e.g., "MD5", "SHA1", "SHA256", "SHA512", etc.). See the OpenSSL documentation for a list of supported digest algorithms.

Throws a Poco::NotFoundException if no algorithm with the given name exists.

## Destructor

### ~DigestEngine

~DigestEngine();

Destroys the DigestEngine.

## Member Functions

### algorithm

const std::string & algorithm() const;

Returns the name of the digest algorithm.

### digest

const Poco::DigestEngine::Digest & digest();

### digestLength

unsigned digestLength() const;

See also: Poco::DigestEngine::digestLength()

### reset

void reset();

See also: Poco::DigestEngine::reset()

### updateImpl

void updateImpl(
const void * data,
unsigned length
);

See also: Poco::DigestEngine::updateImpl()