Convert file of strings to a base64 encoding

Assignment Help Assembly Language
Reference no: EM13759227

Take a file of strings (Which may be binary data) and convert those string to a Base64 encoding.

The encoding scheme to use is the same as that used in rfc1421.

Base64 encoding is a process by which three binary characters are encoded and replaced with 4 text characters. Text characters include A-Z, a-z, 0-9,+,/ (these are all easily printable characters and don't pose any problems to communication software, such as email.) We also use the '=' to represent "padded" characters.

So... Three characters is three bytes, three bytes is 24 bits. But you are going to divide these 24 bits into 4 sets of 6 bits. 2^6 = 64, hence base "64" encoding.

The subsequence "ABC" in a string would have the ASCII values 65 (01000001), 66 (01000010), and 67 (01000011) for a total 24 bit sequence of 010000010100001001000011. Chunking this into 6-bits chunks yields... 010000 010100 001001 000011. As 4 numbers this is 16, 20, 9, and 3. in RFC1421 this equates to the replacement sequence "QUJD"

If the number of letters in a string is not divisible for 3 pad it with = signs.

So take a file of multiple strings, Encode each line in RFC1421 Base64 encoding and output that line to a new file.

THe input file is called "input.txt" the output file shall be named "output64.txt"

Each input line will be less than 1024 characters

Each line may include binary data but will not include carriage return ('\r') or newline ('\n').

Each line will be terminated by the two character end of line sequence ("\r\n")

Reference no: EM13759227

Questions Cloud

Ecosystems : In this assignment, you will investigate the biotic and abiotic structure and function of an ecosystem. You will also investigate how ecosystems recover from disturbance naturally and through human restoration.
Discuss the significance of the independent film movement : American Film and Society Since 1945, or other cited sources. Discuss the significance of the Independent Film Movement in the 1990s. Examine some films or other breakthroughs in Independent Cinema.
Accommodate the network traffic : XUMUC is has the WAN links in place to the new locations in the Houston Region. XUMUC currently has 2 other Regions San Francisco and Denver.
What are some arguments for and against globalisation : Discuss some contrasting views and perspectives in relation to globalisation. What are some arguments for and against Globalisation?
Convert file of strings to a base64 encoding : Take a file of strings (Which may be binary data) and convert those string to a Base64 encoding.
What were the causes of and possible remedies for problem : Recall a time when you experienced a problem as result of poor communication. What were the causes of and possible remedies for the problem?
Calculate the expected rate of return for the portfolio : Calculate the expected rate of return for each stock separately and calculate the expected rate of return for the portfolio.
Explain erp systems : Explain ERP systems? How do they help the entire organization and so more comprehensive than CRM
Should the manager invest in the new equipment : The manager of a regional warehouse must decide on the number of loading docks to request for a new facility in order to minimize the sum of dock costs and driver-truck costs. The manager has learned that each driver-truck combination represents a co..

Reviews

Write a Review

Assembly Language Questions & Answers

  Displays a single character at 100 random screen

Write a program that displays a single character at 100 random screen locations, with a delay factor of 100 milliseconds.Hint: set the console window screen height to 200 at runtime.

  Accept two 1-digit numbers (from 0 to 9) from the keyboard

Write an assembly language program that will accept two 1-digit numbers (from 0 to 9) from the keyboard, compare the two numbers, and then print out th enumber of greatest value

  It has three integer parameters, and it is a value-returning

That is, its name is discr , it has three integer parameters, and it is a value-returning procedure.Follow the cdecl protocol and write a short windows32 test-driver program to test the procedure.

  Nonrecursive factorialwrite a nonrecursive version of the

nonrecursive factorialwrite a nonrecursive version of the factorial procedure that uses a loop. a wdeonote for this

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Assignment related to arm assembly

The 8-Segment display and LEDs will show status of the safe: U: indicates safe is unlocked, L: indicates safe is locked, P: indicates safe is programming a code, C: indicates safe is confirming a new code

  Assembly language program that generates and displays

Write a assembly language program that generates and displays 20 random strings, each consisting of ten letter(A-Z, a-z)s or number(0-9)s.

  Write a program in assembly language which uses bios

write a program in assembly language which uses bios interrupt int 21 to read current system time and displays it on

  Write a function in linux assembly

Write a function in Linux assembly

  Create a program that uses ia-32 assembly language

create a program that usesIA-32 assembly language. It converts integers in the array X to its hex string ad save its to array Y in the respictive locations.

  Create a macro named mwriteint

Create a macro named mWriteInt that writes a signed integer to standard output by calling the WriteInt procedure. The argument passed to the macro can be a byte, word, or double word. Use conditional operators in the macro so it adapts to the size..

  Write two (2) arm assembly language subroutines

Write two (2) ARM assembly language subroutines, called output_char and read_char

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd