aboutsummaryrefslogtreecommitdiff
path: root/keys.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-04-19 20:20:28 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-04-19 20:20:28 +0200
commitcf9759f3b4c987eb9567df267fe911240007b800 (patch)
treec00ddb75492964bc50b2b3175b08dd0cd82ea0df /keys.go
parent619afaba8db996ba61d90c69ed2261b5ab910473 (diff)
Rounds
Diffstat (limited to 'keys.go')
-rw-r--r--keys.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/keys.go b/keys.go
index 08c3ff4..c0429b5 100644
--- a/keys.go
+++ b/keys.go
@@ -105,6 +105,10 @@ func (e *EncKey) Kdf(pass string, rounds int) {
e.KDFRounds = uint32(rounds)
}
+func (e *EncKey) Rounds() int {
+ return int(e.KDFRounds)
+}
+
func Unmarshal(b []byte, v interface{}) error {
buf := bytes.NewReader(b)
if err := binary.Read(buf, binary.BigEndian, v); err != nil {