Posts

Showing posts from September, 2020

npm install gets stuck at fetchMetadata

  This is how I resolved this after spending half an hour: npm config set registry http://registry.npmjs.org/ --global npm cache clear --force setting package-lock.json to  {}  only npm install --verbose node: v12.14.1 npm: v6.13.4 This issue occure when I tried running  ng update  on angular 6 app to update it to angular 9.

crypto-js angular encryption and java decryption

ANGULAR / JS::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::   encode (myString:  string ) {    // PROCESS    const  encodedWord  = CryptoJS.enc.Utf8. parse (myString);  // encodedWord Array object    const  encoded  = CryptoJS.enc.Base64. stringify ( encodedWord );  // string: 'NzUzMjI1NDE='    return  encoded ; } decode (encoded:  string ) {    // PROCESS    const  encodedWord  = CryptoJS.enc.Base64. parse (encoded);  // encodedWord via Base64.parse()    const  decoded  = CryptoJS.enc.Utf8. stringify ( encodedWord );  // decode encodedWord via Utf8.stringify() '75322541'    return  decoded ; } encryptTest (){    console . log ( 'crypto-js' , CryptoJS);    var  decryptedBase64Key  =  'mustbe16byteskey' ;    var  deparsedBase64Key  =...