lintry

Authenticator的不再依赖crypto_utils

......@@ -8,13 +8,12 @@ const Authenticator = function (secret, options) {
}
const _ = require('lodash'),
crypto_utils = require('kml-crypto-utils'),
speakeasy = require('speakeasy'),
qr = require('qr-image');
options = options || {};
this.secret = crypto_utils.AESDecode(secret);
this.secret = secret;
const TOTP_OPTIONS = this.totp_options = {
secret: this.secret,
......
......@@ -34,7 +34,7 @@ const TOTP = function (options) {
* @return {Authenticator}
*/
this.parse = function (secret) {
return new Authenticator(secret, TOTP_OPTIONS)
return new Authenticator(crypto_utils.AESDecode(secret), TOTP_OPTIONS)
};
return this;
......