Browse Source

删除不必要的文件

Pchen. 3 months ago
parent
commit
2382402dca
1 changed files with 0 additions and 33 deletions
  1. 0 33
      apis/Public/EncrypedPwd.js

+ 0 - 33
apis/Public/EncrypedPwd.js

@@ -1,33 +0,0 @@
-const API = require("../../lib/API");
-const { RSAUtils } = require('../../plugin/RSAUtils/RSAUtils')
-const { BaseStdResponse } = require("../../BaseStdResponse");
-
-class EncrypedPwd extends API {
-    constructor() {
-        super();
-
-        this.noEncrypt()
-        this.setPath('/Public/EncrypedPwd')
-        this.setMethod('POST')
-    }
-
-    async onRequest(req, res) {
-        let { modulus, password } = req.body
-
-        if ([modulus, password].some(value => value === '' || value === null || value === undefined))
-            return res.json({
-                ...BaseStdResponse.MISSING_PARAMETER
-            })
-
-        let key = RSAUtils.getKeyPair('10001', "", modulus)
-        const reversedPwd = password.split('').reverse().join('')
-        const encryptedPwd = RSAUtils.encryptedString(key, reversedPwd)
-
-        res.json({
-            ...BaseStdResponse.OK,
-            password: encryptedPwd
-        })
-    }
-}
-
-module.exports.EncrypedPwd = EncrypedPwd