disk

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2015 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const Default_Contact_IsPending bool = false
View Source
const Default_Header_NonceSmearCopies int32 = 1365
View Source
const Default_Header_SCrypt_N int32 = 32768
View Source
const Default_Header_SCrypt_P int32 = 1
View Source
const Default_Header_SCrypt_R int32 = 16
View Source
const Default_Inbox_Retained bool = false

Variables

View Source
var BadPasswordError = errors.New("bad password")

Functions

This section is empty.

Types

type Contact

type Contact struct {
	Id                  *uint64                `protobuf:"fixed64,1,req,name=id" json:"id,omitempty"`
	Name                *string                `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
	GroupKey            []byte                 `protobuf:"bytes,3,req,name=group_key" json:"group_key,omitempty"`
	SupportedVersion    *int32                 `protobuf:"varint,16,opt,name=supported_version" json:"supported_version,omitempty"`
	KeyExchangeBytes    []byte                 `protobuf:"bytes,4,opt,name=key_exchange_bytes" json:"key_exchange_bytes,omitempty"`
	PandaKeyExchange    []byte                 `protobuf:"bytes,18,opt,name=panda_key_exchange" json:"panda_key_exchange,omitempty"`
	PandaError          *string                `protobuf:"bytes,19,opt,name=panda_error" json:"panda_error,omitempty"`
	TheirGroup          []byte                 `protobuf:"bytes,5,opt,name=their_group" json:"their_group,omitempty"`
	MyGroupKey          []byte                 `protobuf:"bytes,6,opt,name=my_group_key" json:"my_group_key,omitempty"`
	Generation          *uint32                `protobuf:"varint,7,opt,name=generation" json:"generation,omitempty"`
	TheirServer         *string                `protobuf:"bytes,8,opt,name=their_server" json:"their_server,omitempty"`
	TheirPub            []byte                 `protobuf:"bytes,9,opt,name=their_pub" json:"their_pub,omitempty"`
	TheirIdentityPublic []byte                 `protobuf:"bytes,10,opt,name=their_identity_public" json:"their_identity_public,omitempty"`
	RevokedUs           *bool                  `protobuf:"varint,21,opt,name=revoked_us" json:"revoked_us,omitempty"`
	LastPrivate         []byte                 `protobuf:"bytes,11,opt,name=last_private" json:"last_private,omitempty"`
	CurrentPrivate      []byte                 `protobuf:"bytes,12,opt,name=current_private" json:"current_private,omitempty"`
	TheirLastPublic     []byte                 `protobuf:"bytes,13,opt,name=their_last_public" json:"their_last_public,omitempty"`
	TheirCurrentPublic  []byte                 `protobuf:"bytes,14,opt,name=their_current_public" json:"their_current_public,omitempty"`
	Ratchet             *RatchetState          `protobuf:"bytes,20,opt,name=ratchet" json:"ratchet,omitempty"`
	PreviousTags        []*Contact_PreviousTag `protobuf:"bytes,17,rep,name=previous_tags" json:"previous_tags,omitempty"`
	Events              []*Contact_Event       `protobuf:"bytes,22,rep,name=events" json:"events,omitempty"`
	IsPending           *bool                  `protobuf:"varint,15,opt,name=is_pending,def=0" json:"is_pending,omitempty"`
	XXX_unrecognized    []byte                 `json:"-"`
}

func (*Contact) GetCurrentPrivate

func (this *Contact) GetCurrentPrivate() []byte

func (*Contact) GetEvents

func (this *Contact) GetEvents() []*Contact_Event

func (*Contact) GetGeneration

func (this *Contact) GetGeneration() uint32

func (*Contact) GetGroupKey

func (this *Contact) GetGroupKey() []byte

func (*Contact) GetId

func (this *Contact) GetId() uint64

func (*Contact) GetIsPending

func (this *Contact) GetIsPending() bool

func (*Contact) GetKeyExchangeBytes

func (this *Contact) GetKeyExchangeBytes() []byte

func (*Contact) GetLastPrivate

func (this *Contact) GetLastPrivate() []byte

func (*Contact) GetMyGroupKey

func (this *Contact) GetMyGroupKey() []byte

func (*Contact) GetName

func (this *Contact) GetName() string

func (*Contact) GetPandaError

func (this *Contact) GetPandaError() string

func (*Contact) GetPandaKeyExchange

func (this *Contact) GetPandaKeyExchange() []byte

func (*Contact) GetPreviousTags

func (this *Contact) GetPreviousTags() []*Contact_PreviousTag

func (*Contact) GetRatchet

func (this *Contact) GetRatchet() *RatchetState

func (*Contact) GetRevokedUs

func (this *Contact) GetRevokedUs() bool

func (*Contact) GetSupportedVersion

func (this *Contact) GetSupportedVersion() int32

func (*Contact) GetTheirCurrentPublic

func (this *Contact) GetTheirCurrentPublic() []byte

func (*Contact) GetTheirGroup

func (this *Contact) GetTheirGroup() []byte

func (*Contact) GetTheirIdentityPublic

func (this *Contact) GetTheirIdentityPublic() []byte

func (*Contact) GetTheirLastPublic

func (this *Contact) GetTheirLastPublic() []byte

func (*Contact) GetTheirPub

func (this *Contact) GetTheirPub() []byte

func (*Contact) GetTheirServer

func (this *Contact) GetTheirServer() string

func (*Contact) ProtoMessage

func (*Contact) ProtoMessage()

func (*Contact) Reset

func (this *Contact) Reset()

func (*Contact) String

func (this *Contact) String() string

type Contact_Event

type Contact_Event struct {
	Time             *int64  `protobuf:"varint,1,req,name=time" json:"time,omitempty"`
	Message          *string `protobuf:"bytes,2,req,name=message" json:"message,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Contact_Event) GetMessage

func (this *Contact_Event) GetMessage() string

func (*Contact_Event) GetTime

func (this *Contact_Event) GetTime() int64

func (*Contact_Event) ProtoMessage

func (*Contact_Event) ProtoMessage()

func (*Contact_Event) Reset

func (this *Contact_Event) Reset()

func (*Contact_Event) String

func (this *Contact_Event) String() string

type Contact_PreviousTag

type Contact_PreviousTag struct {
	Tag              []byte `protobuf:"bytes,1,req,name=tag" json:"tag,omitempty"`
	Expired          *int64 `protobuf:"varint,2,req,name=expired" json:"expired,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*Contact_PreviousTag) GetExpired

func (this *Contact_PreviousTag) GetExpired() int64

func (*Contact_PreviousTag) GetTag

func (this *Contact_PreviousTag) GetTag() []byte

func (*Contact_PreviousTag) ProtoMessage

func (*Contact_PreviousTag) ProtoMessage()

func (*Contact_PreviousTag) Reset

func (this *Contact_PreviousTag) Reset()

func (*Contact_PreviousTag) String

func (this *Contact_PreviousTag) String() string

type Draft

type Draft struct {
	Id               *uint64                      `protobuf:"fixed64,1,req,name=id" json:"id,omitempty"`
	Created          *int64                       `protobuf:"varint,2,req,name=created" json:"created,omitempty"`
	To               *uint64                      `protobuf:"fixed64,3,opt,name=to" json:"to,omitempty"`
	Body             *string                      `protobuf:"bytes,4,req,name=body" json:"body,omitempty"`
	InReplyTo        *uint64                      `protobuf:"fixed64,5,opt,name=in_reply_to" json:"in_reply_to,omitempty"`
	Attachments      []*protos.Message_Attachment `protobuf:"bytes,6,rep,name=attachments" json:"attachments,omitempty"`
	Detachments      []*protos.Message_Detachment `protobuf:"bytes,7,rep,name=detachments" json:"detachments,omitempty"`
	XXX_unrecognized []byte                       `json:"-"`
}

func (*Draft) GetAttachments

func (this *Draft) GetAttachments() []*protos.Message_Attachment

func (*Draft) GetBody

func (this *Draft) GetBody() string

func (*Draft) GetCreated

func (this *Draft) GetCreated() int64

func (*Draft) GetDetachments

func (this *Draft) GetDetachments() []*protos.Message_Detachment

func (*Draft) GetId

func (this *Draft) GetId() uint64

func (*Draft) GetInReplyTo

func (this *Draft) GetInReplyTo() uint64

func (*Draft) GetTo

func (this *Draft) GetTo() uint64

func (*Draft) ProtoMessage

func (*Draft) ProtoMessage()

func (*Draft) Reset

func (this *Draft) Reset()

func (*Draft) String

func (this *Draft) String() string

type ErasureStorage

type ErasureStorage interface {
	// Create creates a new erasure storage object and fills out header to
	// include the needed values.
	Create(header *Header, key *[kdfKeyLen]byte) error
	// Read reads the current value of the storage.
	Read(key *[kdfKeyLen]byte) (*[erasureKeyLen]byte, error)
	// Write requests that the given value be stored and the old value
	// forgotten.
	Write(key *[kdfKeyLen]byte, value *[erasureKeyLen]byte) error
	// Destroy erases the NVRAM entry.
	Destroy(key *[kdfKeyLen]byte) error
}

ErasureStorage represents a type of storage that can store, and erase, small amounts of data.

type Header struct {
	NonceSmearCopies *int32         `protobuf:"varint,1,opt,name=nonce_smear_copies,def=1365" json:"nonce_smear_copies,omitempty"`
	KdfSalt          []byte         `protobuf:"bytes,2,opt,name=kdf_salt" json:"kdf_salt,omitempty"`
	Scrypt           *Header_SCrypt `protobuf:"bytes,3,opt,name=scrypt" json:"scrypt,omitempty"`
	TpmNvram         *Header_TPM    `protobuf:"bytes,4,opt,name=tpm_nvram" json:"tpm_nvram,omitempty"`
	NoErasureStorage *bool          `protobuf:"varint,5,opt,name=no_erasure_storage" json:"no_erasure_storage,omitempty"`
	XXX_unrecognized []byte         `json:"-"`
}

func (*Header) GetKdfSalt

func (this *Header) GetKdfSalt() []byte

func (*Header) GetNoErasureStorage

func (this *Header) GetNoErasureStorage() bool

func (*Header) GetNonceSmearCopies

func (this *Header) GetNonceSmearCopies() int32

func (*Header) GetScrypt

func (this *Header) GetScrypt() *Header_SCrypt

func (*Header) GetTpmNvram

func (this *Header) GetTpmNvram() *Header_TPM

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (this *Header) Reset()

func (*Header) String

func (this *Header) String() string

type Header_SCrypt

type Header_SCrypt struct {
	N                *int32 `protobuf:"varint,2,opt,def=32768" json:"N,omitempty"`
	R                *int32 `protobuf:"varint,3,opt,name=r,def=16" json:"r,omitempty"`
	P                *int32 `protobuf:"varint,4,opt,name=p,def=1" json:"p,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*Header_SCrypt) GetN

func (this *Header_SCrypt) GetN() int32

func (*Header_SCrypt) GetP

func (this *Header_SCrypt) GetP() int32

func (*Header_SCrypt) GetR

func (this *Header_SCrypt) GetR() int32

func (*Header_SCrypt) ProtoMessage

func (*Header_SCrypt) ProtoMessage()

func (*Header_SCrypt) Reset

func (this *Header_SCrypt) Reset()

func (*Header_SCrypt) String

func (this *Header_SCrypt) String() string

type Header_TPM

type Header_TPM struct {
	Index            *uint32 `protobuf:"varint,1,req,name=index" json:"index,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Header_TPM) GetIndex

func (this *Header_TPM) GetIndex() uint32

func (*Header_TPM) ProtoMessage

func (*Header_TPM) ProtoMessage()

func (*Header_TPM) Reset

func (this *Header_TPM) Reset()

func (*Header_TPM) String

func (this *Header_TPM) String() string

type Inbox

type Inbox struct {
	Id               *uint64 `protobuf:"fixed64,1,req,name=id" json:"id,omitempty"`
	From             *uint64 `protobuf:"fixed64,2,req,name=from" json:"from,omitempty"`
	ReceivedTime     *int64  `protobuf:"varint,3,req,name=received_time" json:"received_time,omitempty"`
	Acked            *bool   `protobuf:"varint,4,req,name=acked" json:"acked,omitempty"`
	Message          []byte  `protobuf:"bytes,5,opt,name=message" json:"message,omitempty"`
	Read             *bool   `protobuf:"varint,6,req,name=read" json:"read,omitempty"`
	Sealed           []byte  `protobuf:"bytes,7,opt,name=sealed" json:"sealed,omitempty"`
	Retained         *bool   `protobuf:"varint,8,opt,name=retained,def=0" json:"retained,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Inbox) GetAcked

func (this *Inbox) GetAcked() bool

func (*Inbox) GetFrom

func (this *Inbox) GetFrom() uint64

func (*Inbox) GetId

func (this *Inbox) GetId() uint64

func (*Inbox) GetMessage

func (this *Inbox) GetMessage() []byte

func (*Inbox) GetRead

func (this *Inbox) GetRead() bool

func (*Inbox) GetReceivedTime

func (this *Inbox) GetReceivedTime() int64

func (*Inbox) GetRetained

func (this *Inbox) GetRetained() bool

func (*Inbox) GetSealed

func (this *Inbox) GetSealed() []byte

func (*Inbox) ProtoMessage

func (*Inbox) ProtoMessage()

func (*Inbox) Reset

func (this *Inbox) Reset()

func (*Inbox) String

func (this *Inbox) String() string

type Lock

type Lock struct {
	// contains filtered or unexported fields
}

func (*Lock) Close

func (l *Lock) Close()

type NewState

type NewState struct {
	State                []byte
	RotateErasureStorage bool
	Destruct             bool
}

type Outbox

type Outbox struct {
	Id               *uint64 `protobuf:"fixed64,1,req,name=id" json:"id,omitempty"`
	To               *uint64 `protobuf:"fixed64,2,req,name=to" json:"to,omitempty"`
	Server           *string `protobuf:"bytes,3,req,name=server" json:"server,omitempty"`
	Created          *int64  `protobuf:"varint,4,req,name=created" json:"created,omitempty"`
	Sent             *int64  `protobuf:"varint,5,opt,name=sent" json:"sent,omitempty"`
	Message          []byte  `protobuf:"bytes,6,opt,name=message" json:"message,omitempty"`
	Request          []byte  `protobuf:"bytes,7,opt,name=request" json:"request,omitempty"`
	Acked            *int64  `protobuf:"varint,8,opt,name=acked" json:"acked,omitempty"`
	Revocation       *bool   `protobuf:"varint,9,opt,name=revocation" json:"revocation,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Outbox) GetAcked

func (this *Outbox) GetAcked() int64

func (*Outbox) GetCreated

func (this *Outbox) GetCreated() int64

func (*Outbox) GetId

func (this *Outbox) GetId() uint64

func (*Outbox) GetMessage

func (this *Outbox) GetMessage() []byte

func (*Outbox) GetRequest

func (this *Outbox) GetRequest() []byte

func (*Outbox) GetRevocation

func (this *Outbox) GetRevocation() bool

func (*Outbox) GetSent

func (this *Outbox) GetSent() int64

func (*Outbox) GetServer

func (this *Outbox) GetServer() string

func (*Outbox) GetTo

func (this *Outbox) GetTo() uint64

func (*Outbox) ProtoMessage

func (*Outbox) ProtoMessage()

func (*Outbox) Reset

func (this *Outbox) Reset()

func (*Outbox) String

func (this *Outbox) String() string

type RatchetState

type RatchetState struct {
	RootKey            []byte                    `protobuf:"bytes,1,req,name=root_key" json:"root_key,omitempty"`
	SendHeaderKey      []byte                    `protobuf:"bytes,2,req,name=send_header_key" json:"send_header_key,omitempty"`
	RecvHeaderKey      []byte                    `protobuf:"bytes,3,req,name=recv_header_key" json:"recv_header_key,omitempty"`
	NextSendHeaderKey  []byte                    `protobuf:"bytes,4,req,name=next_send_header_key" json:"next_send_header_key,omitempty"`
	NextRecvHeaderKey  []byte                    `protobuf:"bytes,5,req,name=next_recv_header_key" json:"next_recv_header_key,omitempty"`
	SendChainKey       []byte                    `protobuf:"bytes,6,req,name=send_chain_key" json:"send_chain_key,omitempty"`
	RecvChainKey       []byte                    `protobuf:"bytes,7,req,name=recv_chain_key" json:"recv_chain_key,omitempty"`
	SendRatchetPrivate []byte                    `protobuf:"bytes,8,req,name=send_ratchet_private" json:"send_ratchet_private,omitempty"`
	RecvRatchetPublic  []byte                    `protobuf:"bytes,9,req,name=recv_ratchet_public" json:"recv_ratchet_public,omitempty"`
	SendCount          *uint32                   `protobuf:"varint,10,req,name=send_count" json:"send_count,omitempty"`
	RecvCount          *uint32                   `protobuf:"varint,11,req,name=recv_count" json:"recv_count,omitempty"`
	PrevSendCount      *uint32                   `protobuf:"varint,12,req,name=prev_send_count" json:"prev_send_count,omitempty"`
	Ratchet            *bool                     `protobuf:"varint,13,req,name=ratchet" json:"ratchet,omitempty"`
	V2                 *bool                     `protobuf:"varint,17,opt,name=v2" json:"v2,omitempty"`
	Private0           []byte                    `protobuf:"bytes,14,opt,name=private0" json:"private0,omitempty"`
	Private1           []byte                    `protobuf:"bytes,15,opt,name=private1" json:"private1,omitempty"`
	SavedKeys          []*RatchetState_SavedKeys `protobuf:"bytes,16,rep,name=saved_keys" json:"saved_keys,omitempty"`
	XXX_unrecognized   []byte                    `json:"-"`
}

func (*RatchetState) GetNextRecvHeaderKey

func (this *RatchetState) GetNextRecvHeaderKey() []byte

func (*RatchetState) GetNextSendHeaderKey

func (this *RatchetState) GetNextSendHeaderKey() []byte

func (*RatchetState) GetPrevSendCount

func (this *RatchetState) GetPrevSendCount() uint32

func (*RatchetState) GetPrivate0

func (this *RatchetState) GetPrivate0() []byte

func (*RatchetState) GetPrivate1

func (this *RatchetState) GetPrivate1() []byte

func (*RatchetState) GetRatchet

func (this *RatchetState) GetRatchet() bool

func (*RatchetState) GetRecvChainKey

func (this *RatchetState) GetRecvChainKey() []byte

func (*RatchetState) GetRecvCount

func (this *RatchetState) GetRecvCount() uint32

func (*RatchetState) GetRecvHeaderKey

func (this *RatchetState) GetRecvHeaderKey() []byte

func (*RatchetState) GetRecvRatchetPublic

func (this *RatchetState) GetRecvRatchetPublic() []byte

func (*RatchetState) GetRootKey

func (this *RatchetState) GetRootKey() []byte

func (*RatchetState) GetSavedKeys

func (this *RatchetState) GetSavedKeys() []*RatchetState_SavedKeys

func (*RatchetState) GetSendChainKey

func (this *RatchetState) GetSendChainKey() []byte

func (*RatchetState) GetSendCount

func (this *RatchetState) GetSendCount() uint32

func (*RatchetState) GetSendHeaderKey

func (this *RatchetState) GetSendHeaderKey() []byte

func (*RatchetState) GetSendRatchetPrivate

func (this *RatchetState) GetSendRatchetPrivate() []byte

func (*RatchetState) GetV2

func (this *RatchetState) GetV2() bool

func (*RatchetState) ProtoMessage

func (*RatchetState) ProtoMessage()

func (*RatchetState) Reset

func (this *RatchetState) Reset()

func (*RatchetState) String

func (this *RatchetState) String() string

type RatchetState_SavedKeys

type RatchetState_SavedKeys struct {
	HeaderKey        []byte                               `protobuf:"bytes,1,req,name=header_key" json:"header_key,omitempty"`
	MessageKeys      []*RatchetState_SavedKeys_MessageKey `protobuf:"bytes,2,rep,name=message_keys" json:"message_keys,omitempty"`
	XXX_unrecognized []byte                               `json:"-"`
}

func (*RatchetState_SavedKeys) GetHeaderKey

func (this *RatchetState_SavedKeys) GetHeaderKey() []byte

func (*RatchetState_SavedKeys) GetMessageKeys

func (*RatchetState_SavedKeys) ProtoMessage

func (*RatchetState_SavedKeys) ProtoMessage()

func (*RatchetState_SavedKeys) Reset

func (this *RatchetState_SavedKeys) Reset()

func (*RatchetState_SavedKeys) String

func (this *RatchetState_SavedKeys) String() string

type RatchetState_SavedKeys_MessageKey

type RatchetState_SavedKeys_MessageKey struct {
	Num              *uint32 `protobuf:"varint,1,req,name=num" json:"num,omitempty"`
	Key              []byte  `protobuf:"bytes,2,req,name=key" json:"key,omitempty"`
	CreationTime     *int64  `protobuf:"varint,3,req,name=creation_time" json:"creation_time,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*RatchetState_SavedKeys_MessageKey) GetCreationTime

func (this *RatchetState_SavedKeys_MessageKey) GetCreationTime() int64

func (*RatchetState_SavedKeys_MessageKey) GetKey

func (this *RatchetState_SavedKeys_MessageKey) GetKey() []byte

func (*RatchetState_SavedKeys_MessageKey) GetNum

func (*RatchetState_SavedKeys_MessageKey) ProtoMessage

func (*RatchetState_SavedKeys_MessageKey) ProtoMessage()

func (*RatchetState_SavedKeys_MessageKey) Reset

func (this *RatchetState_SavedKeys_MessageKey) Reset()

func (*RatchetState_SavedKeys_MessageKey) String

type State

type State struct {
	Identity                 []byte                 `protobuf:"bytes,1,req,name=identity" json:"identity,omitempty"`
	Public                   []byte                 `protobuf:"bytes,2,req,name=public" json:"public,omitempty"`
	Private                  []byte                 `protobuf:"bytes,3,req,name=private" json:"private,omitempty"`
	Server                   *string                `protobuf:"bytes,4,req,name=server" json:"server,omitempty"`
	Group                    []byte                 `protobuf:"bytes,5,req,name=group" json:"group,omitempty"`
	GroupPrivate             []byte                 `protobuf:"bytes,6,req,name=group_private" json:"group_private,omitempty"`
	PreviousGroupPrivateKeys []*State_PreviousGroup `protobuf:"bytes,12,rep,name=previous_group_private_keys" json:"previous_group_private_keys,omitempty"`
	Generation               *uint32                `protobuf:"varint,7,req,name=generation" json:"generation,omitempty"`
	LastErasureStorageTime   *int64                 `protobuf:"varint,13,opt,name=last_erasure_storage_time" json:"last_erasure_storage_time,omitempty"`
	Contacts                 []*Contact             `protobuf:"bytes,8,rep,name=contacts" json:"contacts,omitempty"`
	Inbox                    []*Inbox               `protobuf:"bytes,9,rep,name=inbox" json:"inbox,omitempty"`
	Outbox                   []*Outbox              `protobuf:"bytes,10,rep,name=outbox" json:"outbox,omitempty"`
	Drafts                   []*Draft               `protobuf:"bytes,11,rep,name=drafts" json:"drafts,omitempty"`
	XXX_unrecognized         []byte                 `json:"-"`
}

func (*State) GetContacts

func (this *State) GetContacts() []*Contact

func (*State) GetDrafts

func (this *State) GetDrafts() []*Draft

func (*State) GetGeneration

func (this *State) GetGeneration() uint32

func (*State) GetGroup

func (this *State) GetGroup() []byte

func (*State) GetGroupPrivate

func (this *State) GetGroupPrivate() []byte

func (*State) GetIdentity

func (this *State) GetIdentity() []byte

func (*State) GetInbox

func (this *State) GetInbox() []*Inbox

func (*State) GetLastErasureStorageTime

func (this *State) GetLastErasureStorageTime() int64

func (*State) GetOutbox

func (this *State) GetOutbox() []*Outbox

func (*State) GetPreviousGroupPrivateKeys

func (this *State) GetPreviousGroupPrivateKeys() []*State_PreviousGroup

func (*State) GetPrivate

func (this *State) GetPrivate() []byte

func (*State) GetPublic

func (this *State) GetPublic() []byte

func (*State) GetServer

func (this *State) GetServer() string

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) Reset

func (this *State) Reset()

func (*State) String

func (this *State) String() string

type StateFile

type StateFile struct {
	Path string
	Rand io.Reader
	Log  func(format string, args ...interface{})
	// Erasure is able to store a `mask key' - a random value that is XORed
	// with the key. This is done because an ErasureStorage is believed to
	// be able to erase old mask values.
	Erasure ErasureStorage
	// contains filtered or unexported fields
}

StateFile encapsulates information about a state file on diskl

func NewStateFile

func NewStateFile(rand io.Reader, path string) *StateFile

func (*StateFile) Create

func (sf *StateFile) Create(pw string) error

func (*StateFile) Lock

func (sf *StateFile) Lock(create bool) (*Lock, error)

func (*StateFile) Read

func (sf *StateFile) Read(pw string) (*State, error)

func (*StateFile) StartWriter

func (sf *StateFile) StartWriter(states chan NewState, done chan struct{})

type State_PreviousGroup

type State_PreviousGroup struct {
	Group            []byte `protobuf:"bytes,1,req,name=group" json:"group,omitempty"`
	GroupPrivate     []byte `protobuf:"bytes,2,req,name=group_private" json:"group_private,omitempty"`
	Expired          *int64 `protobuf:"varint,3,req,name=expired" json:"expired,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (*State_PreviousGroup) GetExpired

func (this *State_PreviousGroup) GetExpired() int64

func (*State_PreviousGroup) GetGroup

func (this *State_PreviousGroup) GetGroup() []byte

func (*State_PreviousGroup) GetGroupPrivate

func (this *State_PreviousGroup) GetGroupPrivate() []byte

func (*State_PreviousGroup) ProtoMessage

func (*State_PreviousGroup) ProtoMessage()

func (*State_PreviousGroup) Reset

func (this *State_PreviousGroup) Reset()

func (*State_PreviousGroup) String

func (this *State_PreviousGroup) String() string

type TPM

type TPM struct {
	Log  func(format string, args ...interface{})
	Rand io.Reader
	// contains filtered or unexported fields
}

func (*TPM) Create

func (t *TPM) Create(header *Header, key *[kdfKeyLen]byte) error

func (*TPM) Destroy

func (t *TPM) Destroy(key *[kdfKeyLen]byte) error

func (*TPM) Read

func (t *TPM) Read(key *[kdfKeyLen]byte) (*[erasureKeyLen]byte, error)

func (*TPM) Write

func (t *TPM) Write(key *[kdfKeyLen]byte, value *[erasureKeyLen]byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL