iblfile_legacyenc

package
v0.0.0-...-6cd79f0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

From https://github.com/InfinityBotList/iblfile/blob/7d02b1ba186e0d6211330ae3d5442521345f90c1/consts.go

Index

Constants

View Source
const KeyCount = 16

The number of keys to encrypt the data with

Note that changing keycount does not need a change in protocol version

Variables

This section is empty.

Functions

func DecryptData

func DecryptData(encData *bytes.Buffer, enc *PemEncryptionData, privkey []byte) (*bytes.Buffer, error)

Types

type PemEncryptionData

type PemEncryptionData struct {
	// Public key to encrypt data with
	PEM []byte `json:"p"`

	// Encrypted OEAP keys
	Keys [][]byte `json:"k"`

	// Encryption nonce
	Nonce string `json:"n"`

	// Whether or not symmetric encryption is being used
	//
	// If this option is set, then a `privKey` section MUST be present (e.g. using an AutoEncrypted file)
	Symmetric bool `json:"s"`
}

Jump to

Keyboard shortcuts

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