Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ntc-ncrypto

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ntc-ncrypto - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

18

lib/sss/index.js

@@ -136,9 +136,13 @@ /**

// Remove right character '0'
SSS.trimRight = function (s) {
let i = s.length - 1;
while (i >= 0 && s[i] === '0') {
--i;
// Remove right doubled characters '0' (zero byte in hex)
SSS.trimRightDoubledZero = function (s) {
let end = s.length;
for (let i = s.length - 1; i > 2; i -= 2) {
if (s[i] === '0' && s[i - 1] === '0') {
end = i - 1;
} else {
break;
}
}
return s.substring(0, i + 1);
return end == s.length ? s : s.substring(0, end);
};

@@ -159,3 +163,3 @@

// console.log("hexData: " + hexData);
hexData = this.trimRight(hexData);
hexData = this.trimRightDoubledZero(hexData);
result = Buffer.from(hexData, 'hex').toString('utf8');

@@ -162,0 +166,0 @@ // console.log("result: " + result);

{
"name": "ntc-ncrypto",
"version": "0.2.0",
"version": "0.2.1",
"description": "ntc-ncrypto is a module node cryptography",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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