Package Common

Examples of Common.CRC


        long nextHeaderSize = this.inStream.SafeReadDirectUInt64();
        int nextHeaderCRC = this.inStream.SafeReadDirectUInt32();
       
        this.ArchiveInfo.StartPositionAfterHeader = this.inStream.position;
       
        CRC crc = new CRC();
        crc.UpdateUInt64(nextHeaderOffset);
        crc.UpdateUInt64(nextHeaderSize);
        crc.UpdateUInt32(nextHeaderCRC);
       
        if (crc.GetDigest() != crcFromArchive)
            throw new IOException("Incorrect Header, CRCs don't match: archive: " +
                Integer.toHexString(crcFromArchive) + ", calculated: " + crc); // CInArchiveException(CInArchiveException::kIncorrectHeader);
       
        if (nextHeaderSize == 0)
            return;
View Full Code Here

TOP

Related Classes of Common.CRC

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.