New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

onceler

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onceler - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

5

lib/onceler/otp.js

@@ -54,5 +54,10 @@ /*

function verify(x) {
return false;
}
OTP.longToBytes = longToBytes;
OTP.prototype.at = at;
OTP.prototype.verify = verify;
module.exports = OTP;

@@ -46,4 +46,9 @@ /*

function verify(x) {
return this.now() == x;
}
TOTP.prototype.at = at;
TOTP.prototype.now = now;
TOTP.prototype.timeCode = timeCode;
OTP.prototype.verify = verify;

2

package.json
{
"name": "onceler",
"description": "OTP (One Time Password) facilities for node.",
"version": "0.0.1",
"version": "0.0.2",
"engines": {

@@ -6,0 +6,0 @@ "node": ">=0.2.6"

@@ -19,2 +19,9 @@

console.log(totp.now());
// verify a user supplied value
if(totp.verify(1234567)) {
console.log('access granted!');
} else {
console.log('access denied!');
}

@@ -21,0 +28,0 @@ LICENSE

@@ -35,2 +35,8 @@ /*

});
it('should verify', function() {
var totp = new TOTP('IFAUCQKCIJBEE===');
var x = totp.now();
expect(totp.verify(x)).toBeTruthy();
});

@@ -37,0 +43,0 @@ it('should get value at an index of a specified digit size', function() {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc