summaryrefslogtreecommitdiffhomepage
path: root/Types.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-19 13:00:34 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-19 13:00:34 -0400
commit6261f7e58b764ae48293bee3b1863b518e9f0442 (patch)
treed9260d1beeced137e36c1ae1945c499d85e91608 /Types.hs
parentd3323ab8e9e39bcb0a6493d33efa265073920a7d (diff)
downloadkeysafe-6261f7e58b764ae48293bee3b1863b518e9f0442.tar.gz
rename shard -> share
This makes it clearer that it's not a chunk of data, but a Shamir share.
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Types.hs b/Types.hs
index 020bd98..e7dbe1e 100644
--- a/Types.hs
+++ b/Types.hs
@@ -19,10 +19,10 @@ newtype SecretKey = SecretKey B.ByteString
data EncryptedSecretKey = EncryptedSecretKey B.ByteString (CostCalc BruteForceOp UnknownPassword)
instance NFData EncryptedSecretKey where
- rnf (EncryptedSecretKey b _) = rnf b
+ rnf (EncryptedSecretKey bs _) = rnf bs
instance Show EncryptedSecretKey where
- show (EncryptedSecretKey b _) = show b
+ show (EncryptedSecretKey bs _) = show bs
instance Bruteforceable EncryptedSecretKey UnknownPassword where
getBruteCostCalc (EncryptedSecretKey _ cc) = cc
@@ -35,10 +35,10 @@ newtype StorableObject = StorableObject { fromStorableObject :: B.ByteString }
newtype StorableObjectIdent = StorableObjectIdent B.ByteString
deriving (Show, NFData)
--- | A shard, with a known number (N of M).
-data Shard = Shard ShardNum StorableObject
+-- | A Shamir secret share, with a known number (N of M).
+data Share = Share ShareNum StorableObject
-type ShardNum = Int
+type ShareNum = Int
-- | A password used to encrypt a key stored in keysafe.
newtype Password = Password B.ByteString