Documentation
¶
Index ¶
- func Create(name, email string, rsaBits int, expiry time.Duration) (map[string][]byte, error)
- func Decrypt(msg, passphrase, privKey []byte) ([]byte, error)
- func DecryptStream(in io.Reader, out io.Writer, passphrase, privKey []byte) (int64, error)
- func Encrypt(msg []byte, pubKey [][]byte) ([]byte, error)
- func EncryptPrivateKeys(passphrase string, privateKey []byte) ([]byte, error)
- func EncryptStream(in io.Reader, out io.Writer, pubKey [][]byte) (int64, error)
- func ReadIdentity(pubKey [][]byte) ([]map[string]string, error)
- func ReadPublicKey(passphrase, privKey []byte) ([]byte, error)
- func Sign(msg []byte, passphrase []byte, privKey [][]byte) ([]byte, error)
- func SignStream(in io.Reader, out io.Writer, passphrase []byte, privKey [][]byte) error
- func ValidatePrivateKey(privateKey []byte) bool
- func ValidatePublicKey(publicKey []byte) bool
- func Verify(data, signature []byte, pubKey [][]byte) (bool, error)
- func VerifyBundle(signatureIncludingData []byte, pubkey [][]byte) (bool, error)
- func VerifyStream(dataReader, signatureReader io.Reader, pubKey [][]byte) (bool, error)
- func WriteIdentity(pw, privKey []byte, name, comment, email string) (map[string][]byte, error)
- type EncryptablePrivateKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptStream ¶
func EncryptPrivateKeys ¶
func EncryptStream ¶
func ReadPublicKey ¶
func SignStream ¶
func ValidatePrivateKey ¶
func ValidatePublicKey ¶
func VerifyStream ¶
Types ¶
type EncryptablePrivateKey ¶
type EncryptablePrivateKey struct { packet.PrivateKey // contains filtered or unexported fields }
func (*EncryptablePrivateKey) Encrypt ¶
func (pk *EncryptablePrivateKey) Encrypt(passphrase []byte) error
Encrypts private key with aes-128 CFB, based on an iterated/salted s2k key derivation of the supplied passphrase and uses SHA1 as checksum
func (*EncryptablePrivateKey) NewEncryptablePrivateKey ¶
func (pk *EncryptablePrivateKey) NewEncryptablePrivateKey(priv *packet.PrivateKey)
func (*EncryptablePrivateKey) SerializePrivate ¶
func (pk *EncryptablePrivateKey) SerializePrivate(w io.Writer) error
Click to show internal directories.
Click to hide internal directories.