passforios-gopenpgp/crypto/pmcrypto.go

40 lines
1.5 KiB
Go
Raw Normal View History

package crypto
2018-06-04 16:05:14 -07:00
import "time"
// PmCrypto structure to manage multiple address keys and user keys
// Called PGP crypto because it cannot have the same name as the package by gomobile's ridiculous rules.
type PmCrypto struct {
2018-06-04 17:50:26 -07:00
//latestServerTime unix time cache
latestServerTime int64
latestClientTime time.Time
2018-06-04 16:05:14 -07:00
}
// //AddAddress add a new address to key ring
// //add a new address into addresses list
// func (pgp *PmCrypto) AddAddress(address *Address) (bool, error) {
2018-06-04 16:05:14 -07:00
// return true, errors.New("this is not implemented yet, will add this later")
// }
// //RemoveAddress remove address from the keyring
// //
// //#remove a exsit address from the list based on address id
// func (pgp *PmCrypto) RemoveAddress(addressID string) (bool, error) {
2018-06-04 16:05:14 -07:00
// return true, errors.New("this is not implemented yet, will add this later")
// }
// //CleanAddresses clear all addresses in keyring
// func (pgp *PmCrypto) CleanAddresses() (bool, error) {
2018-06-04 16:05:14 -07:00
// return true, errors.New("this is not implemented yet, will add this later")
// }
// //EncryptMessage encrypt message use address id
// func (pgp *PmCrypto) EncryptMessage(addressID string, plainText string, passphrase string, trim bool) (string, error) {
2018-06-04 16:05:14 -07:00
// return "", errors.New("this is not implemented yet, will add this later")
// }
// //DecryptMessage decrypt message, this will lookup all keys
// func (pgp *PmCrypto) DecryptMessage(encryptText string, passphras string) (string, error) {
2018-06-04 16:05:14 -07:00
// return "", errors.New("this is not implemented yet, will add this later")
// }