bug: fix hmac for insecure contexts
Some checks failed
Docker build on tag / build (push) Has been cancelled
Some checks failed
Docker build on tag / build (push) Has been cancelled
This commit is contained in:
@ -2,7 +2,7 @@ import * as secp from "@noble/secp256k1";
|
||||
import * as base64 from "@protobufjs/base64";
|
||||
import { useSelector } from "react-redux";
|
||||
import { RootState } from "State/Store";
|
||||
import { unwrap } from "Util";
|
||||
import { hmacSha256, unwrap } from "Util";
|
||||
|
||||
export interface ImgProxySettings {
|
||||
url: string;
|
||||
@ -19,7 +19,7 @@ export default function useImgProxy() {
|
||||
}
|
||||
|
||||
async function signUrl(u: string) {
|
||||
const result = await secp.utils.hmacSha256(
|
||||
const result = await hmacSha256(
|
||||
secp.utils.hexToBytes(unwrap(settings).key),
|
||||
secp.utils.hexToBytes(unwrap(settings).salt),
|
||||
te.encode(u)
|
||||
|
Reference in New Issue
Block a user