Error digest method not supported

Laravel Mix Version: 6.0.35 Node Version: 17.0.1 NPM Version: 8.1.0 OS: Windows 10 Description: All mix commands fail with: node:internal/crypto/hash:67 this[kHandle] = new _Hash(algorithm, xofLen)...

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account


Closed

benjivm opened this issue

Oct 29, 2021

· 1 comment


Closed

Digest method not supported

#3144

benjivm opened this issue

Oct 29, 2021

· 1 comment

Comments

@benjivm

  • Laravel Mix Version: 6.0.35
  • Node Version: 17.0.1
  • NPM Version: 8.1.0
  • OS: Windows 10

Description:

All mix commands fail with:

node:internal/crypto/hash:67
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: Digest method not supported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at BulkUpdateDecorator.hashFactory
   ...

I did try downgrading node to 16.9.1, and 16.0.0, with no luck.

@benjivm

Running npm upgrade fixes this issue.

1 participant

@benjivm

Environment :

OS : SUSE Linux Enterprise Server 15 SP2
Node: 14.16.0
Express: 4.17.1,
winston: 3.2.1,
winston-daily-rotate-file: 4.4.2

I am using following code :

 var transport = new (winston.transports.DailyRotateFile)({
        filename: 'log/server-%DATE%.log',
        datePattern: 'YYYY-MM-DD-HH',
        maxSize: '100m', //100MB
        zippedArchive: true,
        maxFiles: '10',
        frequency: '24h'
    });

and getting error from crypto submodule of nodejs as «Digest method not supported»

Below is actual line which was throwing error from File «FileStreamRotator.js» under node_modules :
crypto.createHash(‘md5’).update(logfile + «LOG_FILE» + time).digest(«hex»)

Can someone please help to identify the issue here and probable solution?

Issue raised in winston-daily-rotate-file (This has been closed as actual issue is in file-stream-rotator and dependent crypto submodule of nodejs ) : https://github.com/winstonjs/winston-daily-rotate-file/issues/340

Raised the question in file-stream-rotator repo : https://github.com/rogerc/file-stream-rotator/issues/90

Hi guys, I am trying to generate a JWT using Nodejs. I know there are other ways to generate and verify a JWT within Apigee using JS/Java as per @Dino guides.

Locally the Nodejs works fine and generates an JWT, but in Apigee it is gives 500,

var nJwt = require('njwt');
var secureRandom = require('secure-random');


//var signingKey = secureRandom(256, {type: 'Buffer'}); //highly random byte array of 256 bytes
var signingKey = 'password123'; // for testing purpose


//sample claims....will be changed using apigee env variables....
var claims = {
  iss: "http://rs.com/",  
  sub: "users/uuid",    
}

var jwt = nJwt.create(claims,signingKey);
console.log("jwt is ",jwt);

var token = jwt.compact();
console.log("token is ",token);

var base64SigningKey = signingKey.toString('base64'); //Buffer needs to be converted to a string so that it can be persisted in a database
console.log("base64SigningKey is ",base64SigningKey);

Logs in Apigee,

Apr 26, 2017 11:45:47 AM 
jwt is { header: { typ: 'JWT', alg: 'HS256' }, body: { iss: 'http://rs.com/', sub: 'users/uuid', jti: 'a14089e9-3c1f-4a17-b470-5d815fae257d', iat: 1493187347, exp: 1493190947 }, signingKey: 'password123' }


Apr 26, 2017 11:45:47 AM
*** Error: Digest method not supported: "SHA256" Error: Digest method not supported: "SHA256" at Hmac (crypto.js:244) at Hmac (crypto.js:242) at sign (/organization/environment/api/node_modules/njwt/index.js:226) at compact (/organization/environment/api/node_modules/njwt/index.js:250) at /organization/environment/api/hello-world.js:27 at module.js:456 at module.js:474 at module.js:356 at module.js:312 at module.js:497 at startup (trireme.js:142) at trireme.js:923

Recommend Projects

  • React photo

    React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo

    Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo

    Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo

    TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo

    Django

    The Web framework for perfectionists with deadlines.

  • Laravel photo

    Laravel

    A PHP framework for web artisans

  • D3 photo

    D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Visualization

    Some thing interesting about visualization, use data art

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo

    Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo

    Microsoft

    Open source projects and samples from Microsoft.

  • Google photo

    Google

    Google ❤️ Open Source for everyone.

  • Alibaba photo

    Alibaba

    Alibaba Open Source for everyone

  • D3 photo

    D3

    Data-Driven Documents codes.

  • Tencent photo

    Tencent

    China tencent open source team.

Понравилась статья? Поделить с друзьями:
  • Error diffusion madvr
  • Error diffusion dithering
  • Error did not find any matching data in cfg file
  • Error diag halt ipod classic
  • Error dht11 was not declared in this scope