1. Think you have what it takes to join staff? Click here and check out the Staff thread to find out more information!
  2. Visitors to the Programming and Scripting section should be aware of a recent rules revision that can be read by clicking here. Thank you.
  3. Looking to spice up your game collection with a copy of the highly anticipated Bungie title Destiny? Hop on your ship and engage its hyper drive, this contest is going to be a heated one! Visit the contest by clicking here.
  4. Hello Guest, our very own Vanilla Minecraft Server is now up! Be sure to grab a few friends and check out the server here so that you guys can start your very own faction! Check it out HERE!
  5. Community Update: The Community Champion Events will soon be coming to a close, be sure to get your votes in!

    ToTMCoTMEoTM

PackageIO [Open Source IO Class]

Discussion in 'Releases' started by feudalnate, Aug 14, 2009 with 8 replies and 5,870 views.

  1. feudalnate

    feudalnate VIP VIP

    Messages:
    520
    Likes Received:
    274
    Developed by feudalnate
    Special thanks to Mojobojo and DJ Shepherd
    Latest Version: 0.1.9.3

    Usage:

    *Add dll as a reference

    VB:
    Code (Text):
    Imports PackageIO
     
    Dim reader as New PackageIO.Reader(file, Endian.Big)
     
    C#
    Code (Text):

    using PackageIO;
     
    PackageIO writer = New PackageIO.Writer(file, Endian.Big);
     
    Example of using IO class:

    Code (Text):
    Dim IO as New PackageIO.IO(File, Endian.Little)
    Dim Buffer as Byte() = IO.ReadBytes(1337)
    IO.Position = 117
    IO.SwapEndian()
    IO.Write(Buffer)
    IO.Close()
    Example of using Algorithms classes:

    Code (Text):
    Dim Reader as New PackageIO.Reader(File)
    Dim Writer as New PackageIO.Writer(File, Endian.Little, 30)
    Dim SHA1 as New PackageIO.Algorithms.SHA1
    Writer.Write(SHA1.Compute(Reader.ReadBytes(30)))
    Reader.Close()
    Writer.Close()
    Example of using Encryption classes:

    Code (Text):
    Dim AES As New PackageIO.Encryption.Aes()
    AES.Encrypt(Data)
     
    Dim RC2 As New PackageIO.Encryption.RC2(Key, IV)
    RC2.Encrypt(Data, Length)
    Example of using Public Key Cryptography classes:

    Code (Text):
    Dim RSA As New PackageIO.PublicKeyCryptography.RSA(New RSAParameters)
    RSA.SignData(Data, "sha-1")
     
    Dim PKCS1 As New PackageIO.PublicKeyCryptography.PKCS1()
    PKCS1.Key = New RSAParameters
    PKCS1.GenerateSignature(Hash, "sha-1")
    PKCS1.ValidateSignature(Hash, Signature, "sha-1")
     
    Example of using search function:
    Code (Text):
    Function SearchBytes(ByVal Bytes As Byte(), ByVal Position As  Long, ByVal ReturnFirstResultOnly As Boolean) As List(Of Integer)
            Dim File As String = Functions.OpenDialog
            If File = Nothing Then Return Nothing
            Dim Reader As New PackageIO.Reader(File)
            Dim Results As List(Of Integer) = Reader.Search(Bytes, Position, ReturnFirstResultOnly)
            Reader.Close()
            Return Results
        End Function
     

    Includes:

    * Supports Big (Motorola)/Little (Intel) Endian byte order reading/writing

    * Supports reading/writing (signed & unsigned): Int8/16/24/32/40/48/56/64/Single/Double

    * Supports reading/writing: ASCII/Char/Byte String(Hex)/Unicode/Binary String

    * Supports searching: Int8/16/24/32/40/48/56/64/Single/Double (signed & unsigned), ASCII/Unicode/Hex string and byte searching

    * Supports SHA#1/#2/#3/#5, RIPEMD160, Adler32, CRC32, BZIP, Checksum, XOR, MACTripleDES, MD5, HMACSHA#1/#2/#3/#5, HMACRIPEMD160, HMACMD5 & HMACMACTripleDES algorithms

    * Supports AES, DES, RC2, RC4, RSA, TripleDES, & RijndaelManaged encryption

    * Supports RSA and DSA public key cryptography

    * Supports Deflate & GZip compression

    * Misc. array/image/numerical/dialog functions


    It will be updated frequently.


    View C# Source | Download .cs
    Visit website
    *Latest updates can be found in the official thread*
    *Older versions can be downloaded or viewed on the website.*
  2. sgt frankieboy

    sgt frankieboy Enthusiast

    Messages:
    723
    Likes Received:
    132
    I downloaded it Checking what it Can Do
  3. feudalnate

    feudalnate VIP VIP

    Messages:
    520
    Likes Received:
    274

    I told you what it can do and why did you edit my links Ibdc? Im not allowed to earn the $0.00034 a click for my work I'm handing out to the public?
    2 people like this.
  4. feudalnate

    feudalnate VIP VIP

    Messages:
    520
    Likes Received:
    274
    Updated
    1 person likes this.
  5. feudalnate

    feudalnate VIP VIP

    Messages:
    520
    Likes Received:
    274
    Updated (0.1.7.0)
    1 person likes this.
  6. Thilo

    Thilo Newbie

    Messages:
    2,787
    Likes Received:
    1,202
    VERY nice work, guys.
  7. feudalnate

    feudalnate VIP VIP

    Messages:
    520
    Likes Received:
    274
  8. Apathy

    Apathy Seasoned Member

    Messages:
    3,002
    Likes Received:
    876
    Seeing as it hasn't been updated.

    Download Link for PackageIO.dll 0.1.9.2: http://360haven.com/feudalnate/projects/dll/0.1.9.2/PackageIO.dll
  9. feudalnate

    feudalnate VIP VIP

    Messages:
    520
    Likes Received:
    274
    Change logs since 0.1.8.0: