mirror of
https://github.com/feeddeck/feeddeck.git
synced 2026-05-28 14:36:03 -05:00
This commit updates all used Deno modules to their latest version. Since some of the used modules / functions were deprecated we had to adjust our encrypt / descrypt functions and the generation of the source and item ids, where we have to use a new md5 function.
13 lines
300 B
TypeScript
13 lines
300 B
TypeScript
import { crypto } from 'std/crypto';
|
|
import { encode } from 'std/hex';
|
|
|
|
export const md5 = async (str: string): Promise<string> => {
|
|
return new TextDecoder().decode(
|
|
encode(
|
|
new Uint8Array(
|
|
await crypto.subtle.digest('MD5', new TextEncoder().encode(str)),
|
|
),
|
|
),
|
|
);
|
|
};
|