nnazo / csi3344-steganography Goto Github PK
View Code? Open in Web Editor NEWHiding and extracting a secret message inside of a PBM/PPM image.
Hiding and extracting a secret message inside of a PBM/PPM image.
find(DATA)
, then backs up by 8 bytes to read in idatPos (if this results in a value greater than TIPPING_POINT, call flip(idatPos)
), then fast-forward 4 more bytes to put into the correct position.Write one byte's worth of data into the RGB low-order bits. May want some helper functions. Be careful not to overflow image dimensions.
General strategy:
for each bit 'b' in the character:
let c2 = peeked next character
Embed b in c2
put c2 into stream (will overwrite original)
Returns the next hidden character. Must ensure it doesn't overshoot the end of the message.
Check to see if the number of bits in the provided message can be written into the provided file.
https://en.wikipedia.org/wiki/Cyclic_redundancy_check
Function CRC32
Input:
data: Bytes //Array of bytes
Output:
crc32: UInt32 //32-bit unsigned crc-32 value
//Initialize crc-32 to starting value
crc32 ← 0xFFFFFFFF
for each byte in data do
nLookupIndex ← (crc32 xor byte) and 0xFF;
crc32 ← (crc32 shr 8) xor CRCTable[nLookupIndex] //CRCTable is an array of 256 32-bit constants
//Finalize the CRC-32 value by inverting all the bits
crc32 ← crc32 xor 0xFFFFFFFF
return crc32
Embed a 4-byte length of the message a byte at a time using the put
method before writing the actual message.
It's not 'Perex' it's 'Perez.' Way to go, me.
Add an errorMessage field to StegImage which is set by the constructor; this is populated by the constructor to match the cause which tripped the inError flag.
Takes a filename. Opens and must:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.