View source code
							
							
						
								Display the source code in std/digest/package.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Class std.digest.WrapperDigest
Wraps a template API hash struct into a Digest interface. Modules providing digest implementations will usually provide an alias for this template (e.g. MD5Digest, SHA1Digest, ...).
						
				class WrapperDigest(T)
				
				  
				
				if (isDigest!T);
						
					
				Constructors
| Name | Description | 
|---|---|
| this | Initializes the digest. | 
Properties
| Name | Type | Description | 
|---|---|---|
| length[get] | size_t | This is the length in bytes of the hash value which is returned by finish.
 It's also the required size of a buffer passed tofinish. | 
Methods
| Name | Description | 
|---|---|
| finish | The finish function returns the hash value. It takes an optional buffer to copy the data
 into. If a buffer is passed, it must have a length at least lengthbytes. | 
| peek | Works like finishbut does not reset the internal state, so it's possible
 to continue putting data into this WrapperDigest after a call to peek. | 
| put | Use this to feed the digest with data.
 Also implements the isOutputRangeinterface forubyteandconst(ubyte)[]. | 
| reset | Resets the internal state of the digest. | 
| factory | Create instance of class specified by the fully qualified name classname. The class must either have no constructors or have a default constructor. | 
| opCmp | Compare with another Object obj. | 
| opEquals | Test whether thisis equal too.
 The default implementation only compares by identity (using theisoperator).
 Generally, overrides foropEqualsshould attempt to compare objects by their contents. | 
| toHash | Compute hash function for Object. | 
| toString | Convert Object to a human readable string. | 
Example
import stdExample
//using a supplied buffer
import stdAuthors
Johannes Pfau
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.