Skip to content

Instantly share code, notes, and snippets.

View rynomad's full-sized avatar

Ryan Bennett rynomad

View GitHub Profile
//Object DetectSubtleCrypto()
//Establish the availability of various crypto.subtle API's necessary for keygen, signing, verification, hashing
function DetectSubtleCrypto(){
var supportedApis = {};
var baselineSupport = (
(crypto && crypto.subtle)
&& (
(location.protocol === "https:" || "chrome-extension:" || "chrome:")
|| (location.hostname === "localhost" || location.hostname === "127.0.0.1")
)