Digest::base - Digest base class
| Use Case | Command | Description |
|---|---|---|
| 🌱 Create a new digest class | package MyDigest; use base 'Digest::base'; | Define a new digest module by inheriting from Digest::base |
| 📥 Add data to digest | $digest->add($data) | Add data to the digest object |
| 🔢 Get hex digest | $digest->hexdigest | Get the hexadecimal representation of the digest |
| 🔤 Get base64 digest | $digest->b64digest | Get the base64 encoded representation of the digest |
package Digest::Foo;
use base 'Digest::base';
The Digest::base class provides implementations of the methods addfile and add_bits in terms of add, and of the methods hexdigest and b64digest in terms of digest.
Digest implementations might want to inherit from this class to get these implementations of the alternative add and digest methods. A minimal subclass needs to implement the following methods by itself:
newcloneadddigestThe arguments and expected behaviour of these methods are described in Digest.
Generated by phpman v4.9.26-5-g7740029 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-09 19:37 @216.73.216.150
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)