Questions tagged [byte]

A unit of information usually corresponding to 8 bits. This term is also most often used to indicate the smallest addressable unit of storage on a digital system.

A unit of information usually corresponding to 8 bits. This term is also most often used to indicate the smallest addressable unit of storage on a digital system.

These days, the term byte usually refers to a unit of information consisting of 8 . Historically, other sizes have been used as well. If one wants to stress the fixed size, the term octet can be used instead.

7028 questions
2
votes
2 answers

How to Deobfuscation Lua Script?

local script= string.dump( function() print('Hi') end ) buff="" for v=1,string.len(script) do buff=buff..'\\'..string.byte(script,v) end print(buff) script turns into byte code, any idea how to reverse it?
Sutenzzor
  • 29
  • 1
  • 2
2
votes
1 answer

Saving Bytes Vapor Swift

I need some help about saving bytes in Vapor : I have this Image class : class Image: Model { var id: Node? var datas: Bytes var name: String var exists: Bool = false init(name: String, datas: Bytes) { self.name = name self.datas =…
2
votes
1 answer

Convert two unsigned bytes to an int in Java

So let's say I've got two unsigned bytes coming from a device to my software: And I can read their value by: int first = buffer[0] & 0xFF; int second = buffer[1] & 0xFF; And then how can convert these two numbers into an int in Java? In short:…
Forrest
  • 619
  • 2
  • 8
  • 21
2
votes
2 answers

Is there really a limit to sections name in PE binaries?

One awesome article about PE format states the following: Name. Each section header has a name field up to eight characters long, for which the first character must be a period. But I am aware of a few examples that violates this, starting with…
login_not_failed
  • 899
  • 2
  • 12
  • 18
2
votes
1 answer

SQLite insert Null character

So I'm writing a script in Python(2.7) that converts files and then stores the results in a SQlite DB. For the Primary key I'm using the last 29 bytes of the file(as it contains a unique identifier). The problem is these unique identifier's contain…
waterflame
  • 23
  • 6
2
votes
2 answers

PYTHON3 (and not is PYTHON2 ) TypeError: Won't implicitly convert Unicode to bytes; use .encode()

l have this function that works perfectly with python2 def writeCache(env, cache): with env.begin(write=True) as txn: for k, v in cache.items(): txn.put(k, v) However when l execute it with python3.5.2 it…
vincent75
  • 343
  • 5
  • 14
2
votes
1 answer

Two bytes make one Uint16 everywhere, but not in Javascript?

Background I'm using Three.JS to create a heightmap viewer. The data of the height-points of the height-map are UInt16, meaning they are two bytes. I save the two bytes as R and G values in pixels of a PNG file and then send the picture to my…
vaid
  • 1,198
  • 10
  • 27
2
votes
1 answer

C# byte array to string array

I want to convert string of array to byte array and vice-versa Eg. string[] strArr= new string[]{"1","2","3"}; Byte[] byteArr= strArr.Select(byte.Parse).ToArray() Now want to convert it back again to string [] originalArr= ??? from Byte[] I…
PratikD
  • 63
  • 1
  • 5
2
votes
0 answers

python uuid5 equivalent in javascript nodejs

I am trying to convert python code to node js. Need help in converting this code to JS. ``` import uuid uuid_salt = '9909fa72-b690-55dd-ab71-a987953bb438' x = 'hello' uuid_salt = uuid.UUID(uuid_salt) salted_uuid = lambda x: str(uuid.uuid5(uuid_salt,…
Amitesh
  • 21
  • 1
2
votes
2 answers

bytes to hexadecimal and hexadecimal to bytes in nodejs

I have a generated random 16bytes using var crypto = require('crypto'); iv = crypto.randomBytes(16); If I console.log iv, it prints like this When I user iv.toString('hex') function, it…
VIKAS KOHLI
  • 6,488
  • 3
  • 37
  • 45
2
votes
1 answer

How casting works in java using modulo

the below code result "39 44" as output. I read somewhere that casting used modulo here. I know basic how to calculate modulo like 10%3 = 1 but I still didn't get how it calculated here. class conversion { public static void main(String args[])…
Raj Bhatia
  • 889
  • 4
  • 12
  • 27
2
votes
2 answers

C++ Read 1 Bit From Memory?

So looking in debugger I have found that i need to check if 1 bit is set to a certain value. For example lets say at this memory address 0x12345 holds these four bytes 01008100, how would I go about checking if ONLY 8 is right there in that exact…
rflxdev
  • 103
  • 2
  • 10
2
votes
2 answers

How to split bytes from NSData?

So.. I have encrypted data from server that need to be decrypted so that I can get the full response JSON. The thing is I need to split the first 16 bytes of data to get the IV for decryption and the rest of the bytes is the encrypted data. I tried…
Ega Setya Putra
  • 1,525
  • 6
  • 21
  • 48
2
votes
4 answers

Convert Byte to String to Byte

I try to read the byte from "bytefile", changing it to String and store it to "stringfile". The code below is how I perform. PrintWriter writer = new PrintWriter(new FileOutputStream(new File("stringfile"), true)); RandomAccessFile file =…
wcke123
  • 37
  • 3
2
votes
1 answer

c# compare byte arrays

I'm trying to compare 2 byte array using pointers. I treat the byte arrays as int pointer to run things faster(compare 4 bytes together). public static bool DoBuffersEqual(byte[] first, byte[] second) { unsafe { …
Slashy
  • 1,691
  • 1
  • 16
  • 40
1 2 3
99
100