Could someone help me understand hexadecimal representation of files? [closed] - hex

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want to be able to manipulate the hexadecimal representation of a given file (without the use of a 3rd party application). Is the file representation just a series of hex digits in a specific order, or are they groups of a constant number of bytes of hex digits?

Hexadecimal is not a file format, it is a view of the contents of the file. Hex editors open up regular files and give you a view of the contents of the file with each byte represented by pairs of hexadecimal digits instead of letters, numbers, control characters et al.
You cannot view files in hexadecimal mode without an application to do so, any more than you can open up a text file to view it without a program like Notepad. If you are using Windows, there are no "first-party" hex editors available so you will just have to do it the way everyone always has unless you wish to program your own.

Related

How to find and replace string in multiple word (.docx) files using R programming without changing it's original format [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have many word document files in which i need to change few letters which are common in all files. I want to make a Script for replacing the text in all files once. I am using windows machine and R is installed. Suggest me even if you have any other way of doing it.
This files are microsoft word document files and stored in one folder. I have code which get data into R list and find and replace the text. But it creates the file with changed format.
Please suggest me a better way.
I think you are asking if a package exists that can deal with MS Word file? Yes. It does. It is on CRAN: https://cran.r-project.org/web/packages/officer/index.html.

What is this encryption type? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have these two encoded strings but I can't figure it out what type of encryption was used to encode:
lgGggAJp03czFtABAQAbAGlzU2FsZT1GYWxzZSNwcm9kdWN0SWQ9MTAwMQEBARXgQOoQm2IxgpYaAMcu5PS9BxkOQ7H6ezQsZZ4LjqHl5qOQgJQAESr3N5xVvZ5MCg==
and this:
b/d19ASvboAn5QBDCVieHoNTokXm0EaJKcSfrgwPlKykTKcIf7hhAibrCYuP0fK8dLH0SKvF6JWuZUftc7bG8wsVhn1uHX5Q4A6VR3POJ8zdbhiHkTcgQwG8wYYpsP3Vn8hLuoOrZbj6FAqO76GkrBYVfDYyF7GYHXdtBZQm4Dk=
I used base64 but it doesn't work.
Looks like Base64 to me. Any time I see encoding ending with '=' or '==' it is my first guess. I can see 'sales' and 'product id' after decoding your first example though it isn't completely readable. May be double encoded or have other non-printable characters as field delimiters. Hopefully this gets you heading in the right direction.

using cryptographichash in Qt [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am making a program in Qt5.2.1 and in it I am using a text file to store some data. I would like to encrypt it and decrypt it inside the program and display the text stored in the file in a QPlainTextEdit ( or any other similar widget).
I searched and came across Qcryptographichash but i have no idea how to use it. I read somewhere that it does not provide a very secure encryption but that doesn't matter ( I am not expecting hackers to try and read this file).
So, could anyone guide me in the right direction, maybe even give me some code. :D
QCryptographic hash creates a hash from given data. That is a one-way process, so the it will not do what you want, namely encrypt the data in a form that can be retrieved via decryption.
You can read more about the difference between encryption and hashes here.
You need to research into possible encryption algorithms. To my knowledge, that's not something that is part of Qt.
It's a large area of on-going research; there are so many to choose from, as you can see here.

Is it "correct" to do a binary mathematical operation by converting to decimal? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Is it considered correct in order to do a binary or hexadecimal operation to convert to decimal, do the operation, and then convert back to the original numeral system?
Is the above not advised?
Is the above frawned upon?
The context is a (first year) Programming Open University Course and the guide (in lack of a better word to describe him) is delaying my enquiry.
Yes, it's generally correct. Numbers are numbers, no matter how you represent them as text. Note that binary, decimal, and hexadecimal are all text representations of numbers.

Whats the best way to shrink a large body of text? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Suppose im given a large essay. Whats the best method available to shrink it down into a small string of letters which I can decode later? Suppose Im allowed to keep a set of predefined keys if i need to?
Assuming the text is English and you want to minimize the size of the "small string", you will find a number of algorithms here: http://www.maximumcompression.com/data/text.php
For ease-of-implementation, however, you might simply want to use zlib, as it's generally available.
Further, if you want to encrypt the compressed text, you should use AES in CTR mode (and possibly appending an HMAC; ref: http://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html).
Finally, assuming that by "asring of letters" you meant "a string of letters", you could base-64 encode the encrypted data, which would give you a string of letters, numbers, and a limited amount of punctuation.

Resources