Files
DefinitelyTyped/types/blake2
Christoph Gysin 70cd3a77f8 @types/node: Fix crypto input and output encoding (#50055)
* [@types/morgan] Fix tests

* @types/node: Fix crypto input and output encoding

There is a mismatch in supported encodings when trying to call Hmac.update() with a base64 encoded string:

    const message = Buffer.from('message').toString('base64');
    crypto.createHmac('sha256', 'key').update(message, 'base64').digest();

On further investigation, it seems that the same issue is present all over the module.

I renamed the encoding types according to the terminology used in the NodeJS documentation:
- BinaryToTextEncoding
- CharacterEncoding
- LegacyCharacterEncoding

* @types/blake2: Fix crypto import

* @types/dkim-signer: Fix crypto import

Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>
2020-12-15 15:49:08 +00:00
..