You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
642 B

package tdesktop
import (
"fmt"
"github.com/go-faster/errors"
)
// WrongMagicError is returned when tdesktop data file
// has wrong magic header.
type WrongMagicError struct {
Magic [4]byte
}
// Error implements error.
func (w *WrongMagicError) Error() string {
return fmt.Sprintf("wrong magic %+v", w.Magic)
}
var (
// ErrKeyInfoDecrypt is returned when key data decrypt fails.
// It can happen if passed passcode is wrong.
ErrKeyInfoDecrypt = errors.New("key data decrypt")
// ErrNoAccounts reports that decoded tdata does not contain any accounts info.
ErrNoAccounts = errors.New("tdesktop data does not contain accounts")
)