Disable the real webcrypto
Sadly, we are not quite compliant with the WC3 webcrypto spec due to our insistance on passing around key data in plain old ArrayBuffers. Also converted whitespace.
This commit is contained in:
parent
c6aae62151
commit
a4b25f7df1
1 changed files with 75 additions and 75 deletions
|
@ -1,4 +1,4 @@
|
|||
/* vim: ts=4:sw=4
|
||||
/* vim: ts=4:sw=4:expandtab
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
|
@ -17,9 +17,9 @@
|
|||
/* Web Crypto polyfill. TODO: replace with web crypto */
|
||||
// All inputs/outputs are arraybuffers!
|
||||
window.crypto.subtle = (function() {
|
||||
if (window.crypto.subtle !== undefined && window.crypto.subtle !== null) {
|
||||
/* if (window.crypto.subtle !== undefined && window.crypto.subtle !== null) {
|
||||
return window.crypto.subtle;
|
||||
} else {
|
||||
} else*/ {
|
||||
var StaticArrayBufferProto = new ArrayBuffer().__proto__;
|
||||
function assertIsArrayBuffer(thing) {
|
||||
if (thing !== Object(thing) || thing.__proto__ != StaticArrayBufferProto)
|
||||
|
|
Loading…
Reference in a new issue