(base64)
| 1298 | } |
| 1299 | |
| 1300 | static fromBase64String(base64) { |
| 1301 | if (typeof base64 === 'string') { |
| 1302 | let b64 = base64; |
| 1303 | if (base64.startsWith('data:')) { |
| 1304 | b64 = base64.split(',')[1]; |
| 1305 | } |
| 1306 | const bytes = new Bytes(); |
| 1307 | bytes._native = NSData.alloc().initWithBase64EncodedStringOptions(b64, NSDataBase64DecodingOptions.IgnoreUnknownCharacters); |
| 1308 | return bytes; |
| 1309 | } |
| 1310 | return null; |
| 1311 | } |
| 1312 | |
| 1313 | static fromUint8Array(array) { |
| 1314 | if (!(array instanceof Uint8Array)) { |
nothing calls this directly
no outgoing calls
no test coverage detected