diff --git a/src/base32.js b/src/base32.js index 05f7ff5..815947e 100644 --- a/src/base32.js +++ b/src/base32.js @@ -4,7 +4,7 @@ * @author : Gin (gin.lance.inside@hotmail.com) */ - class Base32 { + export default class Base32 { static decode() { console.log("static Base32.decode"); } diff --git a/src/hotp.js b/src/hotp.js index ca8c694..00c08b2 100644 --- a/src/hotp.js +++ b/src/hotp.js @@ -5,7 +5,7 @@ import OTP from './otp'; -class HOTP extends OTP { +export default class HOTP extends OTP { /** * Generate the OTP with the given count * diff --git a/src/jsotp.js b/src/jsotp.js index c446fdb..afda1d4 100644 --- a/src/jsotp.js +++ b/src/jsotp.js @@ -5,8 +5,16 @@ * @Disc : a node module to generate and verify one-time passwords */ -function jsotp(name) { - console.log(`Hello ${name}`); -} +import OTP from './otp'; +import TOTP from './totp'; +import HOTP from './hotp'; +import Base32 from './base32'; +import Util from './util'; -exports.jsotp = jsotp \ No newline at end of file +export { + OTP, + TOTP, + HOTP, + Base32, + Util +}; \ No newline at end of file diff --git a/src/totp.js b/src/totp.js index 259401d..eebbec9 100644 --- a/src/totp.js +++ b/src/totp.js @@ -5,7 +5,7 @@ import OTP from './otp'; - class TOTP extends OTP { +export default class TOTP extends OTP { /** * @param {secret} * @type {String} diff --git a/src/util.js b/src/util.js index 4862081..39efa29 100644 --- a/src/util.js +++ b/src/util.js @@ -3,6 +3,6 @@ * @author : Gin (gin.lance.inside@hotmail.com) */ - class Util { + export default class Util { } \ No newline at end of file