UNPKG

expo-crypto-universal

Version:

Universal crypto implementation for Expo that works across all platforms including web

2 lines (1 loc) 523 B
"use strict";var r=Object.defineProperty;var s=(t,e,o)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var n=(t,e,o)=>s(t,typeof e!="symbol"?e+"":e,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class a{constructor(){n(this,"getRandomBytes",(e=32)=>this.getRandomValues(new Uint8Array(e)))}}const d=()=>{var t;return typeof window<"u"&&typeof((t=window==null?void 0:window.crypto)==null?void 0:t.getRandomValues)=="function"};exports.AbstractCryptoModule=a;exports.isWeb=d;