WXL
3 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
    MIT License http://www.opensource.org/licenses/mit-license.php
    Author Tobias Koppers @sokra
*/
 
"use strict";
 
/** @typedef {import("../../declarations/WebpackOptions").HashDigest} Encoding */
/** @typedef {string | typeof Hash} HashFunction */
 
class Hash {
    /* istanbul ignore next */
    /**
     * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
     * @abstract
     * @overload
     * @param {string | Buffer} data data
     * @returns {Hash} updated hash
     */
    /**
     * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
     * @abstract
     * @overload
     * @param {string} data data
     * @param {Encoding} inputEncoding data encoding
     * @returns {Hash} updated hash
     */
    /**
     * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
     * @abstract
     * @param {string | Buffer} data data
     * @param {Encoding=} inputEncoding data encoding
     * @returns {Hash} updated hash
     */
    update(data, inputEncoding) {
        const AbstractMethodError = require("../AbstractMethodError");
 
        throw new AbstractMethodError();
    }
 
    /* istanbul ignore next */
    /**
     * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
     * @abstract
     * @overload
     * @returns {Buffer} digest
     */
    /**
     * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
     * @abstract
     * @overload
     * @param {Encoding} encoding encoding of the return value
     * @returns {string} digest
     */
    /**
     * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
     * @abstract
     * @param {Encoding=} encoding encoding of the return value
     * @returns {string | Buffer} digest
     */
    digest(encoding) {
        const AbstractMethodError = require("../AbstractMethodError");
 
        throw new AbstractMethodError();
    }
}
 
module.exports = Hash;