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

  • Home
  • SEARCH
  • 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 542477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:27:03+00:00 2026-05-13T10:27:03+00:00

My recent turn-on is using BinaryFormatter instead of some database product. I have an

  • 0

My recent turn-on is using BinaryFormatter instead of some database product. I have an idea to write simple 64bit number into hardware dongle, and encrypt my files with it – via simple XOR operation. Just so it can’t be readable at some other end. Do I derive from Stream, or what?

I know I can simply put that number into the file and check against it on reading, but… I’ll feel better if it’s XORed all the way.

  • 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-13T10:27:04+00:00Added an answer on May 13, 2026 at 10:27 am

    I’m not going to comment on XOR encryption, that’s too silly. Lets focus on practical guidance to implement your custom stream. You should derive it from Stream so it has a familiar interface to the user. Right-click “Stream”, Implement Abstract Class. You can leave most of the NotImplementedException throws in place, streams are commonly crippled like this. Add a private FileStream member, it will do the hard work. Then add:

    • A contructor that takes a string argument, the path to the file. Construct the FileStream with it.
    • Implement CanWrite, return true.
    • Implement the Write() method. Do whatever you need to do to the byte[] that the client passed. You typically need your own byte[] buffer, call Flush() if it is getting too large. Or FileStream.Write() directly if you don’t need a buffer.
    • Implement the Flush method. Call FileStream.Write() for your buffer, then its Flush().
    • Implement Close and Dispose(), call the corresponding FileStream method.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 267k
  • Answers 267k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you mean to clear everything that's drawn so you… May 13, 2026 at 12:48 pm
  • Editorial Team
    Editorial Team added an answer Local path info is stored in the PDB file which… May 13, 2026 at 12:48 pm
  • Editorial Team
    Editorial Team added an answer If you mean on the scanner itself (from memory PPT8800… May 13, 2026 at 12:48 pm

Related Questions

In a recent project I'm using a lot of databinding and xml-serialization. I'm using
I'm asking because PowerShell confuses me. I've been trying to write some deployment scripts
I am using Tortoise SVN. I had checked in a crapload of code recently
So, I've been noodling about with Django's generic views, specifically the object_list view. I
I am writing a Python utility that needs to parse a large, regularly-updated CSV

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.