-
카테고리
-
세부 분야
풀스택
-
해결 여부
미해결
에러 질문
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
복호화 할때 이런 에러가 뜨는데 왜 그럴까요..
답변을 작성해보세요.
0
조현영
지식공유자2020.03.26
createCipher은 더이상 쓰면 안 되고 createCipherIV는 저희가 일반적으로 생각하는 암호화가 아닙니다. 나중에 암호화를 원하시면 npm에서 crypto-js 설치해서 하시는 게 더 편할겁니다.
0
0
조현영
지식공유자2020.03.26
코드는 제 책 그대로 하셨나요? createCipher과 createDecipher가 모두 deprecated되고 createCipherIV, createDecipherIV로 바뀌었습니다. 사실 더이상 crypto로 암호화하는 게 쉽지 않습니다.
답변 3