Last change
on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
925 bytes
|
Line | |
---|
1 | /*
|
---|
2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
---|
3 | Author Tobias Koppers @sokra
|
---|
4 | */
|
---|
5 |
|
---|
6 | "use strict";
|
---|
7 |
|
---|
8 | class Hash {
|
---|
9 | /* istanbul ignore next */
|
---|
10 | /**
|
---|
11 | * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
---|
12 | * @abstract
|
---|
13 | * @param {string|Buffer} data data
|
---|
14 | * @param {string=} inputEncoding data encoding
|
---|
15 | * @returns {this} updated hash
|
---|
16 | */
|
---|
17 | update(data, inputEncoding) {
|
---|
18 | const AbstractMethodError = require("../AbstractMethodError");
|
---|
19 | throw new AbstractMethodError();
|
---|
20 | }
|
---|
21 |
|
---|
22 | /* istanbul ignore next */
|
---|
23 | /**
|
---|
24 | * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
---|
25 | * @abstract
|
---|
26 | * @param {string=} encoding encoding of the return value
|
---|
27 | * @returns {string|Buffer} digest
|
---|
28 | */
|
---|
29 | digest(encoding) {
|
---|
30 | const AbstractMethodError = require("../AbstractMethodError");
|
---|
31 | throw new AbstractMethodError();
|
---|
32 | }
|
---|
33 | }
|
---|
34 |
|
---|
35 | module.exports = Hash;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.