eslint: enable "no-undef" and "object-curly-spacing"
This commit is contained in:
parent
5d0fc5ac6e
commit
2753075765
@ -8,9 +8,7 @@
|
||||
"jest": true
|
||||
},
|
||||
"rules": {
|
||||
"no-undef": "off",
|
||||
"max-len": "off",
|
||||
"object-curly-spacing": "off",
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
|
@ -220,6 +220,7 @@ export default class SsAeadCipherPreset extends IPreset {
|
||||
let tag = null;
|
||||
if (this._isUseLibSodium) {
|
||||
const noop = Buffer.alloc(0);
|
||||
// eslint-disable-next-line
|
||||
const result = libsodium[libsodium_functions[cipherName][0]](
|
||||
message, noop, noop, nonce, cipherKey
|
||||
);
|
||||
@ -241,6 +242,7 @@ export default class SsAeadCipherPreset extends IPreset {
|
||||
if (this._isUseLibSodium) {
|
||||
const noop = Buffer.alloc(0);
|
||||
try {
|
||||
// eslint-disable-next-line
|
||||
const plaintext = libsodium[libsodium_functions[cipherName][1]](
|
||||
noop, ciphertext, tag, noop, nonce, decipherKey
|
||||
);
|
||||
|
@ -538,6 +538,7 @@ export default class V2rayVmessPreset extends IPresetAddressing {
|
||||
}
|
||||
else if (security === SECURITY_TYPE_CHACHA20_POLY1305) {
|
||||
const noop = Buffer.alloc(0);
|
||||
// eslint-disable-next-line
|
||||
const result = libsodium.crypto_aead_chacha20poly1305_ietf_encrypt_detached(
|
||||
plaintext, noop, noop, nonce, this._dataEncKeyForChaCha20
|
||||
);
|
||||
@ -565,6 +566,7 @@ export default class V2rayVmessPreset extends IPresetAddressing {
|
||||
else if (security === SECURITY_TYPE_CHACHA20_POLY1305) {
|
||||
const noop = Buffer.alloc(0);
|
||||
try {
|
||||
// eslint-disable-next-line
|
||||
const plaintext = libsodium.crypto_aead_chacha20poly1305_ietf_decrypt_detached(
|
||||
noop, ciphertext, tag, noop, nonce, this._dataDecKeyForChaCha20
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user