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 7950875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:24:00+00:00 2026-06-04T02:24:00+00:00

The documentation says If you use the following values, then you will get this

  • 0

The documentation says “If you use the following values, then you will get this result”.

Block Size: 128
Cipher Mode: CBC
Padding Mode: Zeros

Key: BTikvHBatPdAtgT3317QIQqGFY25WpIz

IV: a5Sg4U9m11Mw2tIZ

Value to be encyrpted: 2008-06-02 13:28:45,Statements,1234567,,06/01/2008,06/01/2008,0

And this how the encryption result should look like after all these values are used according the developer guides.

b97f3985245be1065604c5808cebaa2e15813bf938cfaa3c198fd464565c13ced7c91ac6
b68326ce5ed5e81cb7de81acb9fcd1b1636127efbac3203da5bdccea

However, I cannot get this result for some reason, this is the code I used to populate this result but it gives me same characters at first and later on the characters changes as you may see in the result at very bottom of this question.

This is the code and below is the new output:

public static void Main(string[] args)
{
  RijndaelManaged rij = new RijndaelManaged();
  rij.Mode = CipherMode.CBC;
  rij.Padding = PaddingMode.Zeros;
  rij.Key = ASCIIEncoding.UTF8.GetBytes("BTikvHBatPdAtgT3317QIQqGFY25WpIz");
  rij.IV = ASCIIEncoding.UTF8.GetBytes("a5Sg4U9m11Mw2tIZ");
  ICryptoTransform transform = rij.CreateEncryptor();

  byte[] data = Encoding.ASCII.GetBytes("2008-06-02 13:28:45,Statements,1234567,,06/01/2008,06/01/2008,0");
  byte[] result = transform.TransformFinalBlock(data, 0, data.Length);
  Console.WriteLine(ByteArrayToString(result));
}

public static string ByteArrayToString(byte[] ba)
{
  StringBuilder hex = new StringBuilder(ba.Length * 2);
  foreach (byte b in ba)
    hex.AppendFormat("{0:x2}", b);
  return hex.ToString();
}

My output :

b97f3985245be1065604c5808cebaa2e15813bf938cfaa3c198fd464565c13ced7c91ac6b68326ce5ed5e81cb7de81ac

Note: I needed to update the question as I advanced and found a better solution but the new problem has arose right now.

  • 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-06-04T02:24:02+00:00Added an answer on June 4, 2026 at 2:24 am

    You were talking about weird characters in your output – actually, the output you posted is hex encoding, so you should try to encode yours to hex, too, as explained here.

    Edit:

    I figured it out now. You need to additionally Close() either the stream or the writer – in CBC mode, this is needed to finalize the padding on the last block, if it is omitted then the last block will not be output. Next problem is that if you do this, then you will still end up with a slightly different output than the one expected in your example. Here’s why: if you decrypt your example ciphertext, you will get:

    2008-06-02 13:28:45,Statements,1234567,,06/01/2007,06/01/2007,0
    

    It differs from your plaintext in that there’s a 2007 at the end where you have 2008. If you fix this and properly close the stream then you will finally receive exactly the same output as in the example.

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

Sidebar

Related Questions

I'm trying to use this module on opencms: http://www.codedroids.com/en/opencms/downloads/com.codedroids.oc.forms.html I am following the documentation:
The documentation says to use: $(input[type='checkbox']).bind( change, function(event, ui) { But I want to
I can't understand the process described in documentation. It says to use event: procedure
The PHP documentation says the following about the __call() magic method: __call() is triggered
The documentation for SQL Server Float says Approximate-number data types for use with floating
The Eclipselink documentation says that I need the following entries in my pom.xml to
Under the documentation for UIViewController -> nibName property it says: This property contains the
Boost's any_range documentation says the following: Despite the underlying any_iterator being the fastest available
I'm attempting to use explicit member constraints in F#. The documentation says F# supports
The Android documentation says the following about IntentService: [IntentService] creates a work queue that

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.