Refactor some low-level crypto things
This commit is contained in:
parent
905357a2e1
commit
5583e82a20
4 changed files with 42 additions and 53 deletions
|
@ -159,12 +159,6 @@ function toArrayBuffer(thing) {
|
|||
return res;
|
||||
}
|
||||
|
||||
function assertIsArrayBuffer(thing) {
|
||||
if (thing !== Object(thing) || thing.__proto__ != StaticArrayBufferProto)
|
||||
console.log("WARNING: Needed a ArrayBuffer");
|
||||
return toArrayBuffer(thing);
|
||||
}
|
||||
|
||||
function ensureStringed(thing) {
|
||||
if (getStringable(thing))
|
||||
return getString(thing);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue