Files
go-i2p/lib/crypto/encrypt.go

18 lines
399 B
Go
Raw Normal View History

package crypto
2016-01-28 15:21:01 -05:00
// encrypts data
type Encrypter interface {
// encrypt a block of data
// return encrypted block or nil and error if an error happened
Encrypt(data []byte) (enc []byte, err error)
}
type PublicEncryptionKey interface {
// create a new encrypter to encrypt data to this public key
NewEncrypter() (Encrypter, error)
// length of this public key in bytes
Len() int
}