G
G
Gregory2020-04-27 01:58:54
JavaScript
Gregory, 2020-04-27 01:58:54

From swift to JavaScript?

I roughly understand how it will look like in js, but I'm not sure enough. Help me convert to JS from SWIFT

let message: [UInt8] = [
            0x01,
            21,
            0xFF,
            0xFF,
            0xFF,
            0xFF,
            0xFF,
            UInt8(target & 0xFF),
            UInt8(target >> 8 & 0xFF)
        ]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RAX7, 2020-04-27
@Loovery

let message = new Uint8Array([
    0x01,
    21,
    0xFF,
    0xFF,
    0xFF,
    0xFF,
    0xFF,
    target & 0xFF,
    target >> 8 & 0xFF
]);

Uint8Array

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question