Documentation ¶
Index ¶
- type CryptographicIdentity
- func (ci *CryptographicIdentity) GetE2eDhPrivateKey() *cyclic.Int
- func (ci *CryptographicIdentity) GetE2eDhPublicKey() *cyclic.Int
- func (ci *CryptographicIdentity) GetReceptionID() *id.ID
- func (ci *CryptographicIdentity) GetReceptionRSA() rsa.PrivateKey
- func (ci *CryptographicIdentity) GetReceptionSalt() []byte
- func (ci *CryptographicIdentity) GetTransmissionID() *id.ID
- func (ci *CryptographicIdentity) GetTransmissionRSA() rsa.PrivateKey
- func (ci *CryptographicIdentity) GetTransmissionSalt() []byte
- func (ci *CryptographicIdentity) IsPrecanned() bool
- type Info
- type Proto
- type User
- func (u *User) GetReceptionRegistrationValidationSignature() []byte
- func (u *User) GetRegistrationTimestamp() time.Time
- func (u *User) GetTransmissionRegistrationValidationSignature() []byte
- func (u *User) GetUsername() (string, error)
- func (u *User) PortableUserInfo() Info
- func (u *User) SetReceptionRegistrationValidationSignature(b []byte)
- func (u *User) SetRegistrationTimestamp(tsNano int64)
- func (u *User) SetTransmissionRegistrationValidationSignature(b []byte)
- func (u *User) SetUsername(username string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CryptographicIdentity ¶
type CryptographicIdentity struct {
// contains filtered or unexported fields
}
func (*CryptographicIdentity) GetE2eDhPrivateKey ¶
func (ci *CryptographicIdentity) GetE2eDhPrivateKey() *cyclic.Int
func (*CryptographicIdentity) GetE2eDhPublicKey ¶
func (ci *CryptographicIdentity) GetE2eDhPublicKey() *cyclic.Int
func (*CryptographicIdentity) GetReceptionID ¶
func (ci *CryptographicIdentity) GetReceptionID() *id.ID
func (*CryptographicIdentity) GetReceptionRSA ¶
func (ci *CryptographicIdentity) GetReceptionRSA() rsa.PrivateKey
func (*CryptographicIdentity) GetReceptionSalt ¶
func (ci *CryptographicIdentity) GetReceptionSalt() []byte
func (*CryptographicIdentity) GetTransmissionID ¶
func (ci *CryptographicIdentity) GetTransmissionID() *id.ID
func (*CryptographicIdentity) GetTransmissionRSA ¶
func (ci *CryptographicIdentity) GetTransmissionRSA() rsa.PrivateKey
func (*CryptographicIdentity) GetTransmissionSalt ¶
func (ci *CryptographicIdentity) GetTransmissionSalt() []byte
func (*CryptographicIdentity) IsPrecanned ¶
func (ci *CryptographicIdentity) IsPrecanned() bool
type Info ¶
type Info struct { //General Identity TransmissionID *id.ID TransmissionSalt []byte TransmissionRSA rsa.PrivateKey ReceptionID *id.ID ReceptionSalt []byte ReceptionRSA rsa.PrivateKey Precanned bool // Timestamp in which user has registered with the network RegistrationTimestamp int64 //e2e Identity E2eDhPrivateKey *cyclic.Int E2eDhPublicKey *cyclic.Int }
func NewUserFromBackup ¶
func NewUserFromProto ¶
type Proto ¶
type Proto struct { //General Identity TransmissionID *id.ID TransmissionSalt []byte TransmissionRSA *oldrsa.PrivateKey ReceptionID *id.ID ReceptionSalt []byte ReceptionRSA *oldrsa.PrivateKey Precanned bool // Timestamp in which user has registered with the network RegistrationTimestamp int64 RegCode string TransmissionRegValidationSig []byte ReceptionRegValidationSig []byte //e2e Identity E2eDhPrivateKey *cyclic.Int E2eDhPublicKey *cyclic.Int }
type User ¶
type User struct { *CryptographicIdentity // contains filtered or unexported fields }
func NewUser ¶
func NewUser(kv versioned.KV, transmissionID, receptionID *id.ID, transmissionSalt, receptionSalt []byte, transmissionRsa, receptionRsa rsa.PrivateKey, isPrecanned bool, e2eDhPrivateKey, e2eDhPublicKey *cyclic.Int) (*User, error)
builds a new user.
func (*User) GetReceptionRegistrationValidationSignature ¶
Returns the reception Identity Validation Signature stored in RAM. May return nil of no signature is stored
func (*User) GetRegistrationTimestamp ¶
Returns the registration timestamp stored in RAM as
func (*User) GetTransmissionRegistrationValidationSignature ¶
Returns the transmission Identity Validation Signature stored in RAM. May return nil of no signature is stored
func (*User) GetUsername ¶
func (*User) PortableUserInfo ¶
func (*User) SetReceptionRegistrationValidationSignature ¶
Sets the Identity Validation Signature if it is not set and stores it in the ekv
func (*User) SetRegistrationTimestamp ¶
Sets the Registration Timestamp if it is not set and stores it in the ekv
func (*User) SetTransmissionRegistrationValidationSignature ¶
Sets the Identity Validation Signature if it is not set and stores it in the ekv
func (*User) SetUsername ¶
Click to show internal directories.
Click to hide internal directories.