scrypt

package
v0.0.0-...-32f009b Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptCipherText

func DecryptCipherText(cipherText CipherText, password []byte) (aes.PlainText, error)

decrypt scrypt cipher

Types

type CipherText

type CipherText struct {
	CipherText aes.CipherText `json:"cipher_text"`
	ScryptKey  Key            `json:"scrypt_key"`
	Version    uint8          `json:"version"`
}

func NewCipherText

func NewCipherText(plainText []byte, password []byte) (CipherText, error)

Create new ScryptCipherText

func (*CipherText) Marshal

func (s *CipherText) Marshal() ([]byte, error)

exports CipherText as json

type Key

type Key struct {
	N      int    `json:"n"`
	R      int    `json:"r"`
	P      int    `json:"p"`
	KeyLen int    `json:"key_len"`
	Salt   []byte `json:"salt"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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