Provides decryption of a SafeInCloud database in Golang.
package main
import (
"fmt"
"log"
"os"
"github.com/mxschmitt/golang-safe-in-cloud"
)
func main() {
file, err := os.Open("SafeInCloud.db")
if err != nil {
log.Fatalf("could not read file: %v", err)
}
raw, err := sic.Decrypt(file, "foobar")
if err != nil {
log.Fatalf("could not decrypt: %v", err)
}
fmt.Println(string(raw))
x, err := sic.Unmarshal(raw)
if err != nil {
log.Fatalf("could not unmarshal: %v", err)
}
fmt.Printf("data: %+v\n", x)
}