Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dennis-tra/image-stego
/ functions
Functions
45 in github.com/dennis-tra/image-stego
⨍
Functions
45
◇
Types & classes
3
↓ 13 callers
Function
WithLSB
WithLSB returns the given byte with the least significant bit (LSB) set to the given bit value, while true means 1 and false means 0.
pkg/bit/bit.go:5
↓ 11 callers
Method
Write
Write writes the given bytes to the least significant bits of the chunk. It returns the number of bytes written from p and an error if one occurred. C
internal/chunk/chunk.go:108
↓ 10 callers
Method
Read
Read reads the amount of bytes given in p from the LSBs of the image chunk. It returns the number of bytes read from the least significant bits and an
internal/chunk/chunk.go:144
↓ 7 callers
Function
blackImage
blackImage creates an RGBA image with the given width and height where all pixels are black. The underlying Pix byte array contains w x h x 4 entries.
internal/chunk/chunk_test.go:26
↓ 7 callers
Function
whiteImage
whiteImage creates an RGBA image with the given width and height where all pixels are white. The underlying Pix byte array contains w x h x 4 entries.
internal/chunk/chunk_test.go:33
↓ 5 callers
Method
Height
Height is a short hand to return the height in pixels of the chunk
internal/chunk/chunk.go:39
↓ 5 callers
Function
ImageToRGBA
ImageToRGBA converts an image.Image to an *image.RGBA
internal/chunk/file.go:56
↓ 5 callers
Method
Width
Width is a short hand to return the width in pixels of the chunk
internal/chunk/chunk.go:34
↓ 3 callers
Function
GetLSB
GetLSB given a byte, will return the least significant bit of that byte
pkg/bit/bit.go:14
↓ 3 callers
Function
SaveImageFile
SaveImageFile saves the given image data to the given filepath as a PNG image.
internal/chunk/file.go:34
↓ 3 callers
Function
SetExtension
SetExtension sets the file extension to nexExt and removes the old one
internal/chunk/file.go:50
↓ 2 callers
Function
CalculateChunkBounds
CalculateChunkBounds takes the given *image.RGBA and calculates the optimal distribution of image chunks to encode the merkle tree data. The more chu
internal/chunk/dimension.go:29
↓ 2 callers
Method
LSBCount
LSBCount returns the total number of least significant bits (LSB) available for encoding a message. Currently only the RGB values are considered not t
internal/chunk/chunk.go:50
↓ 2 callers
Method
MaxX
MaxX in this context returns the ending value for iterating over the horizontal axis of the image
internal/chunk/chunk.go:60
↓ 2 callers
Method
MaxY
MaxY in this context returns the ending value for iterating over the vertical axis of the image
internal/chunk/chunk.go:70
↓ 2 callers
Method
MinX
MinX in this context returns the starting value for iterating over the horizontal axis of the image
internal/chunk/chunk.go:55
↓ 2 callers
Method
MinY
MinY in this context returns the starting value for iterating over the vertical axis of the image
internal/chunk/chunk.go:65
↓ 2 callers
Function
OpenImageFile
OpenImageFile opens the file at the given path and returns the decoded *image.RGBA
internal/chunk/file.go:14
↓ 2 callers
Method
PixelCount
PixelCount returns the total number of pixels
internal/chunk/chunk.go:44
↓ 2 callers
Function
assertPixExpect
(t *testing.T, chunk Chunk, expects []PixExpect)
internal/chunk/chunk_test.go:305
↓ 2 callers
Function
chunkDist
chunkDist calculates the chunk distribution along the width and height. The aim is to get an evenly distributed field of chunks.
internal/chunk/dimension.go:110
↓ 1 callers
Method
CalculateHash
CalculateHash calculates the SHA256 hash of the 7 most significant bits. The least significant bit (LSB) is not considered in the hash generation as i
internal/chunk/chunk.go:80
↓ 1 callers
Function
Decode
(filepath string)
internal/chunk/decode.go:13
↓ 1 callers
Function
Encode
(filepath string, outdir string)
internal/chunk/encode.go:14
↓ 1 callers
Method
MaxPayloadSize
MaxPayloadSize returns the maximum number of bytes that can be written to this chunk
internal/chunk/chunk.go:29
↓ 1 callers
Function
primeFactors
primeFactors returns what the name says ;) Src: https://siongui.github.io/2017/05/09/go-find-all-prime-factors-of-integer-number/
internal/chunk/dimension.go:138
Method
Equals
Equals tests for equality of two Contents. It only considers the 7 most significant bits since the last bit contains the hash data of the other chunks
internal/chunk/chunk.go:187
Function
TestBitsPerPixelInRange
(t *testing.T)
internal/chunk/chunk_test.go:41
Function
TestChunk_LSBCount
(t *testing.T)
internal/chunk/chunk_test.go:53
Function
TestChunk_MaxPayloadSize1
(t *testing.T)
internal/chunk/chunk_test.go:58
Function
TestChunk_PixelCount
(t *testing.T)
internal/chunk/chunk_test.go:46
Function
TestChunk_WriteEmptyInput
(t *testing.T)
internal/chunk/chunk_test.go:78
Function
TestChunk_WriteMoreThanPossible
(t *testing.T)
internal/chunk/chunk_test.go:146
Function
TestChunk_WritePartialByteWritten
(t *testing.T)
internal/chunk/chunk_test.go:160
Function
TestChunk_WriteSetAllBitsToOne
(t *testing.T)
internal/chunk/chunk_test.go:94
Function
TestChunk_WriteSetMixedBits
(t *testing.T)
internal/chunk/chunk_test.go:117
Function
TestGetLSB
(t *testing.T)
pkg/bit/bit_test.go:10
Function
TestReadWrite
(t *testing.T)
internal/chunk/chunk_test.go:246
Function
TestReadWriteSeparate
(t *testing.T)
internal/chunk/chunk_test.go:266
Function
TestRead_LargerReadBuffer
(t *testing.T)
internal/chunk/chunk_test.go:218
Function
TestRead_MatchingLength
(t *testing.T)
internal/chunk/chunk_test.go:188
Function
TestRead_PartialReadBuffer
(t *testing.T)
internal/chunk/chunk_test.go:232
Function
TestRead_SmallerReadBuffer
(t *testing.T)
internal/chunk/chunk_test.go:203
Function
TestWithLSB
(t *testing.T)
pkg/bit/bit_test.go:29
Function
main
()
cmd/stego/main.go:12