fix up elg crypto parts

This commit is contained in:
Jeff Becker
2016-01-28 15:21:01 -05:00
parent 3deb15e012
commit 48d9efe4b4
4 changed files with 39 additions and 2 deletions

15
lib/crypto/decrypt.go Normal file
View File

@ -0,0 +1,15 @@
package crypto
// decrypts data
type Decrypter interface {
// decrypt a block of data
// return decrypted block or nil and error if error happens
Decrypt(data []byte) ([]byte, error)
}
type PrivateEncryptionKey interface {
// create a new decryption object for this private key to decrypt data encrypted to our public key
// returns decrypter or nil and error if the private key is in a bad format
NewDecrypter() (Decrypter, error)
}