Documentation
¶
Index ¶
- func Decrypt(ciphertext, key, iv []byte) ([]byte, error)
- func DeriveKey(password string, salt []byte, iterations int) []byte
- func Encrypt(plaintext, key, iv []byte) ([]byte, error)
- func GenerateDeterministicRSAKeys(sourceFile, password string) error
- func GenerateRandomSalt() []byte
- func GetKeyFromPEM(filename string) ([]byte, error)
- type DeterministicReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDeterministicRSAKeys ¶
Writes "key.pem" using the sourceFile and password for entropy.
func GenerateRandomSalt ¶
func GenerateRandomSalt() []byte
func GetKeyFromPEM ¶
Reads a PEM file, strips headers, and hashes the content to derive a 32-byte key.
Types ¶
type DeterministicReader ¶
type DeterministicReader struct {
// contains filtered or unexported fields
}
func NewDeterministicReader ¶
func NewDeterministicReader(seed []byte) (*DeterministicReader, error)
Click to show internal directories.
Click to hide internal directories.