mirror of
https://github.com/amark/gun.git
synced 2025-06-01 19:56:46 +00:00

* WIP: use isomorphic-webcrypto for RN * WIP: expo friendly exports * WIP: buffer for RN * WIP: textencoder for RN * WIP: aeskey from jwk instead of raw for RN * fix: missing taglength for msrcrypto * add: update isomorphic-webcrypto * add: match isocrypto api * add: failing test for 4e2 as 400 * fix: remove extra atob btoa * add: sea unbuild * refactor: according to mhelander review * refactor: shorter require * fix: make bug test pass, capitlize bug test. * fix: npm ci + sea test * add: restore old browser export and add react-native friendly exports * fix: import buffer into correct global/window * fix: bad comparison * fix: only include buffer if no btoa/atob
9 lines
331 B
JavaScript
9 lines
331 B
JavaScript
|
|
if(typeof btoa === "undefined"){
|
|
if(typeof Buffer === "undefined") {
|
|
root.Buffer = require("buffer").Buffer
|
|
}
|
|
root.btoa = function (data) { return Buffer.from(data, "binary").toString("base64"); };
|
|
root.atob = function (data) { return Buffer.from(data, "base64").toString("binary"); };
|
|
}
|
|
|