File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 1+ import { subtle } from "uncrypto" ;
12import { base64 , base64Url } from "./base64" ;
23import type { EncodingFormat , SHAFamily , TypedArray } from "./type" ;
34
@@ -11,7 +12,7 @@ export function createHash<Encoding extends EncodingFormat = "none">(
1112 ) : Promise < Encoding extends "none" ? ArrayBuffer : string > => {
1213 const encoder = new TextEncoder ( ) ;
1314 const data = typeof input === "string" ? encoder . encode ( input ) : input ;
14- const hashBuffer = await crypto . subtle . digest ( algorithm , data ) ;
15+ const hashBuffer = await subtle . digest ( algorithm , data ) ;
1516
1617 if ( encoding === "hex" ) {
1718 const hashArray = Array . from ( new Uint8Array ( hashBuffer ) ) ;
Original file line number Diff line number Diff line change 11import { describe , expect , it } from "vitest" ;
22import { createHMAC } from "./hmac" ;
3- import { base64Url } from "./base64" ;
43
54describe ( "hmac module" , ( ) => {
65 const algorithm = "SHA-256" ;
You can’t perform that action at this time.
0 commit comments