utils

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2025 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressAndEncrypt

func CompressAndEncrypt(plaintext, key []byte) ([]byte, []byte, error)

CompressAndEncrypt compresses the input data and then encrypts it with AES-GCM

func CompressXZ

func CompressXZ(data []byte) ([]byte, error)

func DecompressXZ

func DecompressXZ(compressedData []byte) ([]byte, error)

DecompressXZ decompresses XZ data

func DecryptAESGCM

func DecryptAESGCM(ciphertext, nonce, key []byte) ([]byte, error)

DecryptAESGCM decrypts data using AES-GCM

func DecryptAndDecompress

func DecryptAndDecompress(ciphertext, key, nonce []byte) ([]byte, error)

DecryptAndDecompress decrypts the data with AES-GCM and decompresses it using XZ

func DeriveKey

func DeriveKey(password string) []byte

func Embed

func Embed(inputFile string, outputFile string, container string, key []byte, encryption bool, verbose bool) error

func EmbedToLSB

func EmbedToLSB(pcmData []byte, message []byte) ([]byte, error)

EmbedToLSB embeds a message into the least significant bit (LSB) of PCM data.

func EncryptAESGCM

func EncryptAESGCM(plaintext, key []byte) ([]byte, []byte, error)

EncryptAESGCM encrypts data using AES-GCM

func Extract

func Extract(container, outputFile string, key []byte, encryption bool, verbose bool) error

Extract retrieves hidden data from a WAV file

func ExtractGDPFromLSB

func ExtractGDPFromLSB(pcmData []byte) ([]byte, error)

ExtractGDPFromLSB extracts a GDP file from the LSB of PCM data.

func GetEmbedSize

func GetEmbedSize(pcmData []byte) int

GetEmbedSize calculates the available space for embedding data in PCM.

func MakeGDPFile

func MakeGDPFile(encryption bool, nonce []byte, ciphertext []byte) ([]byte, error)

MakeGDPFile constructs a GDP file with the given encryption flag, nonce, and ciphertext.

func PCMToWAV

func PCMToWAV(outputFile string, pcmData []byte, metadata wavMetadata) error

PCMToWAV converts a PCM byte array to a WAV byte array using a header.

func ParseGDPFile

func ParseGDPFile(input []byte, dummy bool) (bool, int, []byte, uint64, []byte, error)

ParseGDPFile parses a GDP file format and extracts encryption flag, nonce, and ciphertext.

func ReadGDPFile

func ReadGDPFile(input string) (bool, int, []byte, uint64, []byte, error)

ReadGDPFile reads a GDP file from disk and parses its contents.

func SpawnGui

func SpawnGui()

SpawnGui initializes and runs the GoDeep GUI

func WAVToPCM

func WAVToPCM(inputFile string) ([]byte, *wavMetadata, error)

WAVToPCM reads a WAV file and extracts PCM data and its header.

func WriteGDPFile

func WriteGDPFile(filename string, encryption bool, nonce []byte, ciphertext []byte) error

WriteGDPFile writes a GDP file to disk.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL