Digester returns a new digester for the specified algorithm. If the algorithm does not have a digester implementation, nil will be returned. This can be checked by calling Available before calling Digester.
()
| 107 | // does not have a digester implementation, nil will be returned. This can be |
| 108 | // checked by calling Available before calling Digester. |
| 109 | func (a Algorithm) Digester() Digester { |
| 110 | return &digester{ |
| 111 | alg: a, |
| 112 | hash: a.Hash(), |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | // Hash returns a new hash as used by the algorithm. If not available, the |
| 117 | // method will panic. Check Algorithm.Available() before calling. |
no test coverage detected