encryption

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCorruptedCrypt = errors.New("error corrupted crypt file")

Functions

func GenerateRandomNonce

func GenerateRandomNonce() (nonce, error)

fromReader fills the nonce from an io.Reader - normally the OSes crypto random number generator

Types

type CipherType

type CipherType string

CipherType represents the type of encryption cipher used

const (
	// RCloneCipherType is the rclone crypt cipher type, which encrypts files using a password and salt
	RCloneCipherType CipherType = "rclone"
	// NoneCipherType represents no encryption
	NoneCipherType CipherType = "none"
	// AesCipherType is for AES-CBC encrypted archives (RAR, 7z, etc.)
	AesCipherType CipherType = "aes"
)

type Config

type Config struct {
	// Rclone password for the files in case they were encrypted by rclone crypt
	// Use it, in case you don't want to use rclone crypt anymore
	RclonePassword string `yaml:"rclone_password" mapstructure:"rclone_password" json:"-"`
	// Rclone salt for the files in case they were encrypted by rclone crypt
	// Use it, in case you don't want to use rclone crypt anymore
	RcloneSalt string `yaml:"rclone_salt" mapstructure:"rclone_salt" json:"-"`
}

Config contains encryption configuration

Directories

Path Synopsis
pkcs7
Package pkcs7 implements PKCS#7 padding
Package pkcs7 implements PKCS#7 padding

Jump to

Keyboard shortcuts

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