tahoe-chk-0.2.0.0: The Tahoe-LAFS' Content-Hash-Key (CHK) cryptographic protocol.
Safe HaskellNone
LanguageHaskell2010

Tahoe.CHK.Upload

Synopsis

Documentation

data UploadResult Source #

Instances

Instances details
Show UploadResult Source # 
Instance details

Defined in Tahoe.CHK.Upload

data Parameters Source #

Instances

Instances details
Eq Parameters Source # 
Instance details

Defined in Tahoe.CHK.Types

Ord Parameters Source # 
Instance details

Defined in Tahoe.CHK.Types

Show Parameters Source # 
Instance details

Defined in Tahoe.CHK.Types

Generic Parameters Source # 
Instance details

Defined in Tahoe.CHK.Types

Associated Types

type Rep Parameters :: Type -> Type #

ToExpr Parameters Source # 
Instance details

Defined in Tahoe.CHK.Types

type Rep Parameters Source # 
Instance details

Defined in Tahoe.CHK.Types

type Rep Parameters = D1 ('MetaData "Parameters" "Tahoe.CHK.Types" "tahoe-chk-0.2.0.0-inplace" 'False) (C1 ('MetaCons "Parameters" 'PrefixI 'True) ((S1 ('MetaSel ('Just "paramSegmentSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SegmentSize) :*: S1 ('MetaSel ('Just "paramTotalShares") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Total)) :*: (S1 ('MetaSel ('Just "paramHappyShares") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Happy) :*: S1 ('MetaSel ('Just "paramRequiredShares") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Required))))

upload Source #

Arguments

:: [StorageServer]

The servers to consider uploading shares to.

-> Key AES128

The encryption key (to derive the storage index).

-> Parameters

The encoding parameters (XXX only for happy, right?)

-> ([ByteString], Reader)

The share data to upload.

-> IO UploadResult

Describe the outcome of the upload.

Given some cleartext, some encoding parameters, and some servers: encrypt, encode, and upload some shares that can later be used to reconstruct the cleartext.

This replaces allmydata.immutable.upload.Uploader.upload.

store Source #

Arguments

:: [StorageServer]

The servers to consider using.

-> Uploadable

The application data to operate on.

-> IO UploadResult

The result of the attempt.

Encrypt and encode some application data to some ZFEC shares and upload them to some servers.

encryptAndEncode Source #

Arguments

:: Uploadable

The application data to encrypt and encode.

-> IO ([ByteString], Reader)

An action to get an action that can be repeatedly evaluated to get share data. As long as there is more share data, it evaluates to Left. When shares are done, it evaluates to Right.

Given some cleartext and some encoding parameters: encrypt and encode some shares that can later be used to reconstruct the cleartext.