Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4250288
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:30:32+00:00 2026-05-21T04:30:32+00:00

i have exponent whats 3 bytes long. Now i need it to be 4

  • 0

i have exponent whats 3 bytes long. Now i need it to be 4 bytes. I found somewhere that i could pad at the leading octets.. but i have no idea to do that.. So can anybody help me out?

Example Input: exponent what i have right now is 65537, int bytes its then 01 00 01.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:30:33+00:00Added an answer on May 21, 2026 at 4:30 am

    Assuming you just want to pad it with zeroes, create a new four byte array and copy the existing one into it:

    byte[] newArray = new byte[4];
    // Copy bytes 0, 1, 2 of oldArray into 1, 2, 3 of newArray.
    Array.Copy(oldArray, 0, newArray, 1, 3);
    

    (You can do this manually with three assignments as well; that’s potentially simpler for this situation, but doesn’t scale well (in terms of code) to larger sizes.)

    Change the “1” to “0” if you find you need the padding at the end instead of the start… or use Array.Resize in that case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have something like: static long double calcFactor_(const short mantissa, const short exponent,const
Okay. . . pointers are driving me bonkers!!! Okay, now that I have that
I have some Java code that sends the public exponent and modulus (very, very
I have a method to calculate the exponent, but it doesnt like the c
I have a 128-byte (1024-bit) modulus (in a byte array format) and my exponent
Have you ever seen any of there error messages? -- SQL Server 2000 Could
In .NET I have generated the following public key file: <RSAKeyValue> <Modulus>xTSiS4+I/x9awUXcF66Ffw7tracsQfGCn6g6k/hGkLquHYMFTCYk4mOB5NwLwqczwvl8HkQfDShGcvrm47XHKUzA8iadWdA5n4toBECzRxiCWCHm1KEg59LUD3fxTG5ogGiNxDj9wSguCIzFdUxBYq5ot2J4iLgGu0qShml5vwk=</Modulus> <Exponent>AQAB</Exponent> </RSAKeyValue>
Have a look at the following code to find X^y. /* Find exponent in
I have a piece of code that presents an interesting question (in my opinion).
We have a CFD solver and while running a simulation, it was found to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.