mirror of
https://github.com/go-i2p/go-i2p.git
synced 2025-07-05 06:05:16 -04:00
18 lines
399 B
Go
18 lines
399 B
Go
package crypto
|
|
|
|
// 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
|
|
}
|