Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Using FCEF format

Tarith Jayasooriya edited this page Dec 20, 2020 · 1 revision

Prerequisites

What will be covered

  1. Why FCEF format
  2. Using FCEF in your application

1) Why FCEF format

FCEF is designed to be cross compatible with almost every programming language due to storing in binary format not in json or xml,
The FCEF file format is partitioned in a very simple way so Its even possible to take apart every data group with a hex editor.
Due to FCEF format being simplistic its suitable for different occasions.
But it's mainly designed to be used when storing small sized (under 90MB) files.

2) Using FCEF in your application

Using FCEF in your application is pretty straight forward (Currently fcef is only implemented in golang)

golang

  1. Install FileCrypt using go get go get github.com/flew-software/filecrypt
  2. Add filecrypt package to your code
package main
import "github.com/flew-software/filecrypt"

//....//

here's a example that uses filecrypt to encrypt/decrypt messages

package main
import "github.com/flew-software/filecrypt"

func main() {
  ed, err := filecrypt.EncryptAES256([]byte("testing"), filecrypt.Passphrase("this is a password"))
  if err != nil {
     fmt.Errorf(err)
  }
  
  d, err := filecrypt.DecryptAES256(ed, filecrypt.Passphrase("this is a password"))
  if err != nil {
     fmt.Errorf(err)
  }
  
  log.Println(d) // Prints decrypted data
}

Help Wanted on porting filecrypt to other programing languages

Clone this wiki locally