This repository has been archived on 2023-12-17. You can view files and clone it, but cannot push or open issues or pull requests.
|
import { Crypto } from "@peculiar/webcrypto";
|
|
|
|
let globalCrypto = window.crypto;
|
|
if (!globalCrypto.subtle) {
|
|
let subtleCrypto = new Crypto().subtle;
|
|
Object.defineProperty(globalCrypto, "subtle", {
|
|
get() {
|
|
return subtleCrypto;
|
|
},
|
|
});
|
|
}
|