diff options
Diffstat (limited to 'source/crypto/SealedBox.mc')
| -rw-r--r-- | source/crypto/SealedBox.mc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/crypto/SealedBox.mc b/source/crypto/SealedBox.mc index 0804b96..765a1d8 100644 --- a/source/crypto/SealedBox.mc +++ b/source/crypto/SealedBox.mc @@ -20,6 +20,8 @@ import Toybox.Cryptography; import Toybox.Lang; +// (:glance): also loaded by the glance, which shows the favourite code (GlanceCode). +(:glance) module SealedBox { const VERSION = 1; @@ -34,8 +36,8 @@ module SealedBox { var macKey as ByteArray; function initialize(masterKey as ByteArray) { - encKey = Kdf.hkdf(masterKey, []b, Bytes.fromUtf8("OTPW enc v1"), KEY_BYTES); - macKey = Kdf.hkdf(masterKey, []b, Bytes.fromUtf8("OTPW mac v1"), KEY_BYTES); + encKey = Hkdf.derive(masterKey, []b, Bytes.fromUtf8("OTPW enc v1"), KEY_BYTES); + macKey = Hkdf.derive(masterKey, []b, Bytes.fromUtf8("OTPW mac v1"), KEY_BYTES); } // Wipe both keys (when the session locks). |
