You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: src/app/shared/services/crypto.service.ts:47:59 - error TS2345: Argument of type 'HasherHelper' is not assignable to parameter of type '(str: string) => string'.
Type 'WordArray' is not assignable to type 'string'.
47 const result = this.crypto.verify(payload, signature, CryptoJS.SHA256);
Hello,
I'm in the middle of an Angular update version from 9 to 16 and I'm getting this error when I updated crypto-js from 3.2.1 to 3.3.2
The original code was
but It was giving this error
Error: src/app/shared/services/crypto.service.ts:47:59 - error TS2345: Argument of type 'HasherHelper' is not assignable to parameter of type '(str: string) => string'.
Type 'WordArray' is not assignable to type 'string'.
47 const result = this.crypto.verify(payload, signature, CryptoJS.SHA256);
Is this enough to replace the code with
or is there a correct and better way? At the moment I cannot create a unit test for this since the solution is not compiling
Any help appreciated,
Thanks
The text was updated successfully, but these errors were encountered: