Giter VIP home page Giter VIP logo

encrypt-rsa's Introduction

Hi There πŸ‘‹, Here is Milad

Software Engineer

Experienced, passionate, and self-motivated technical operations leader with a diverse history spanning every facet of software design, development, deployment, and maintenance.

Most comfortable on the cutting edge, loves to learn and explore, and is truly inspired by today’s emerging technologies and methodologies.

You can say, A Software Engineer with industry experience building web services

  • Backend: NodeJS/NestJS, Python, GoLang
  • Databases: MongoDB, Mysql, Elastic Search, Postgres, DynamoDB.
  • Frontend: ReactJS/NextJS, Bootstrap, HTML/HTML5, SCSS, Javascript/ES6
  • DevOps: AWS services (EC2, Lambda function, SNS, SQS, EventBridge, Step Function), CI/CD, Docker, Kubernetes, GCP.

Find Me


Languages and Tools:

Visual Studio Code

Node.js

MySQL

MongoDB

GCP

K8

React

GraphQL

HTML5

CSS3

Sass

JavaScript

Git

GitHub

Terminal





My GitHub Stats 😎

miladezzat's GitHub stats

encrypt-rsa's People

Contributors

miladezzat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

encrypt-rsa's Issues

Error: error:04099079:rsa routines:RSA_padding_check_PKCS1_OAEP_mgf1:oaep decoding error

I'm receiving an error while trying to execute an automation run, the error is the following:
Error: error:04099079:rsa routines:RSA_padding_check_PKCS1_OAEP_mgf1:oaep decoding error at NodeRSA.decryptStringWithRsaPrivateKey

The script:

`import EncryptRsa from 'encrypt-rsa';
const encryptRsa = new EncryptRsa();
const { privateKey, publicKey } = encryptRsa.createPrivateAndPublicKeys();

function encrypt(text: string) {
return encryptRsa.encryptStringWithRsaPublicKey({
text,
publicKey,
});
}

function decrypt(encryptedText: string) {
return encryptRsa.decryptStringWithRsaPrivateKey({
text: encryptedText,
privateKey,
});`

In other possible solutions I read that we need to add a padding to solve this issue:
https://www.anycodings.com/1questions/3120595/error-error04099079rsa-routinesrsapaddingcheckpkcs1oaepmgf1oaep-decoding-error

Unsupported engine npm 9

Hi there,

We have a project running using node 18 and npm 9.5.0 and we noticed that when we run npm install, its shows a warning:

image

I realize that with the new version, 2.1.4, the engine is compatible with node 18, but still uncompatible with npm 9.x:

image

Could we have something like this?

image

I think that way we provide to the clients the possibility to use the library with other versions of nodejs/npm without this warning. What do you guys think about it?

Thank you

TypeError: (0 , crypto_1.generateKeyPairSync) is not a function

i have done it like that only but still getting this error
TypeError: (0 , crypto_1.generateKeyPairSync) is not a function
the snippets are as follows:-
export const nodeRSA = new NodeRSA();
export const { privateKey, publicKey } = nodeRSA.createPrivateAndPublicKeys();

Usage in Vue3

Trying to use this encrypt-rsa library in a Vue3 project, specifically calling it from some auth logic in a Pinia store.

This is how I'm using the library:

 try {

        let myText = "whatever i need to encrypt";
        let nodeRSA = new NodeRSA();
        let pkpath = 'assets/public.key'; // also tried: path.join(__dirname, './public.key');
        let encryptedText = nodeRSA.encryptStringWithRsaPublicKey({ 
          text: myText, 
          keyPath: pkpath
        });        
        console.log('nodeRSA gives:', encryptedText );

      } catch (e) {
        console.log(e);        
      }

And this is the error I get:

TypeError: Qc.resolve is not a function
    at e.encryptStringWithRsaPublicKey (vendor.597d2110.js:29:2388)
    at Proxy.rsaEncode (index.b3e59d3a.js:1:2951)
    at Proxy.<anonymous> (vendor.597d2110.js:5:2026)
    at Proxy.logIn (index.b3e59d3a.js:1:1300)
    at Proxy.<anonymous> (vendor.597d2110.js:5:2026)
    at d (index.b3e59d3a.js:1:4209)
    at vendor.597d2110.js:1:62460
    at Mo (vendor.597d2110.js:1:12590)
    at $n (vendor.597d2110.js:1:12669)
    at Ym (vendor.597d2110.js:1:14693)

Any help or insight would be appreciated.

Thanks.

error in const encryptRsa = new EncryptRsa();

Compiled with problems:X

ERROR in ./node_modules/encrypt-rsa/build/index.js 37:26-43

Module not found: Error: Can't resolve 'crypto' in '/Users/prathap/Desktop/kotak/mb-admin-app-2.0/node_modules/encrypt-rsa/build'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }

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.

  • 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.

  • 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.

  • D3 photo D3

    Data-Driven Documents codes.