• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

에러 질문

20.03.26 06:44 작성 조회수 217

0

/usr/local/bin/node /Users/usang-in/WebstormProjects/nodejs-crawler/lecture2/cipher.js

internal/crypto/cipher.js:90

    this[kHandle].init(cipher, credential, authTagLength);

                  ^

Error: Unknown cipher

    at Cipher.createCipherBase (internal/crypto/cipher.js:90:19)

    at Cipher.createCipher (internal/crypto/cipher.js:114:20)

    at new Cipher (internal/crypto/cipher.js:131:16)

    at Object.createCipher (crypto.js:111:10)

    at Object.deprecated (internal/util.js:67:15)

    at Object.<anonymous> (/Users/usang-in/WebstormProjects/nodejs-crawler/lecture2/cipher.js:3:23)

    at Module._compile (internal/modules/cjs/loader.js:776:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)

    at Module.load (internal/modules/cjs/loader.js:643:32)

    at Function.Module._load (internal/modules/cjs/loader.js:556:12)

Process finished with exit code 1

복호화 할때 이런 에러가 뜨는데 왜 그럴까요..

답변 3

·

답변을 작성해보세요.

0

createCipher은 더이상 쓰면 안 되고 createCipherIV는 저희가 일반적으로 생각하는 암호화가 아닙니다. 나중에 암호화를 원하시면 npm에서 crypto-js 설치해서 하시는 게 더 편할겁니다.

0

Woo  Sangin님의 프로필

Woo Sangin

질문자

2020.03.26

아아 암호화 하기 쉽지 않다는게 더이상 지원이 안된다는 뜻일까요?

0

코드는 제 책 그대로 하셨나요? createCipher과 createDecipher가 모두 deprecated되고 createCipherIV, createDecipherIV로 바뀌었습니다. 사실 더이상 crypto로 암호화하는 게 쉽지 않습니다.