Steganography Online Codec SDK for Go
Steganography Online Codec allows you to hide a password encrypted message within the images & photos using AES
encryption algorithm with a 256-bit PBKDF2 derived key.
You can use it for free at:
https://www.pelock.com/products/steganography-online-codec
This SDK provides programming access to the codec and its encoding and decoding functions through a WebAPI interface.
What is steganography & how it works?
Steganography is a term describing the art and science of hiding information by embedding messages within other, seemingly harmless image files.
In this case, the individual bits of the encrypted hidden message are saved as the least significant (LSB) bits in the
RGB color components in the pixels of the selected image.

With our steganographic encoder you will be able to conceal any text message in the image in a secure way and
send it without raising any suspicion. It will only be possible to read the message after providing valid, decryption
password.
Installation
The preferred way to install the Web API SDK is via Go modules.
go get github.com/PELock/Steganography-Online-Codec-Go
The module path is github.com/PELock/Steganography-Online-Codec-Go.
Packages for other programming languages
The installation packages have been uploaded to repositories for several popular programming languages and their source codes have been published on GitHub:
| Repository |
Language |
Installation |
Package |
GitHub |
 |
Python |
Run pip install steganography-online-codec |
PyPI |
Sources |
 |
JavaScript, TypeScript |
Run npm i steganography-online-codec or add "steganography-online-codec": "latest" under dependencies in package.json |
NPM |
Sources |
 |
Rust |
Run cargo add steganography-online-codec or add steganography-online-codec = "1" to Cargo.toml (optional: git / path for unreleased or vendored builds) |
crates.io |
Sources |
Example — decode/main.go
/******************************************************************************
* Steganography Online Codec WebApi interface usage example.
*
* Version : v1.0.2
* Language : Go
* Author : Bartosz Wójcik
* Web page : https://www.pelock.com
*
*****************************************************************************/
package main
import (
"context"
"fmt"
"os"
steganographyonlinecodec "github.com/PELock/Steganography-Online-Codec-Go"
)
func main() {
client := steganographyonlinecodec.New("YOUR-WEB-API-KEY")
result, err := client.Decode(context.Background(), "output_file_with_hidden_secret_message.png", "Pa$$word")
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
if result.Error != steganographyonlinecodec.ErrorSuccess {
fmt.Printf("Error code %d\n", result.Error)
os.Exit(1)
}
fmt.Println(result.Message)
}
Example — login/main.go
/******************************************************************************
* Steganography Online Codec WebApi interface usage example.
*
* Version : v1.0.2
* Language : Go
* Author : Bartosz Wójcik
* Web page : https://www.pelock.com
*
*****************************************************************************/
package main
import (
"context"
"fmt"
"os"
steganographyonlinecodec "github.com/PELock/Steganography-Online-Codec-Go"
)
func main() {
client := steganographyonlinecodec.New("YOUR-WEB-API-KEY")
result, err := client.Login(context.Background())
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Printf("error=%d demo=%v\n", result.Error, result.Demo)
}
Example — simple/main.go
/******************************************************************************
* Steganography Online Codec WebApi interface usage example.
*
* Version : v1.0.2
* Language : Go
* Author : Bartosz Wójcik
* Web page : https://www.pelock.com
*
*****************************************************************************/
package main
import (
"context"
"fmt"
"os"
steganographyonlinecodec "github.com/PELock/Steganography-Online-Codec-Go"
)
func main() {
client := steganographyonlinecodec.New("YOUR-WEB-API-KEY")
result, err := client.Encode(context.Background(), "input_file.jpg", "Secret message", "Pa$$word", "output_file_with_hidden_secret_message.png")
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
if result.Error == steganographyonlinecodec.ErrorSuccess {
fmt.Println("Secret message encoded and saved to the output PNG file.")
return
}
fmt.Printf("Error code %d\n", result.Error)
}
See the examples/ directory in this repository for complete samples.
Got questions?
If you are interested in the Steganography Online Codec Web API or have any questions regarding SDK packages, technical or if something is not clear, please contact me. I'll be happy to answer all of your questions.
Bartosz Wójcik