Repository navigation
v0.2.12
·
113 commits
to master
since this release
Language
Secretis text that must not leak:hide(text)answers aResult<Secret, SecretError>kept in memory that is never swapped to disk, andreveal(secret)is the only way back to aStr.bypass(text)is aSecretthat cannot fail, kept in ordinary memory that may be swapped out.hive.Secretandhive.SecretErrorreach the builtins from a program that declares its own.- A
Secretis never shown:echo,panic, interpolation,encodeand a service message refuse one, or anything holding one, at compile time. ==on secrets compares what they hold, in constant time.
Standard library
hive.crypto.encryptanddecryptkeep the plaintext aSecret, under aSecretpassword, andhmacSha256andjwtCodectake aSecretkey.hive.term.readSecret()answers aResult<Secret, SecretError>, read straight into locked memory, andhive.file.writeSecretandhive.syslink.setKeytake aSecret.hive.env.getSecret(name)isgetanswering aSecret, andhive.crypto.randomSecret(bytes)israndomHexdrawn into locked memory, answering aResult.hive.ui.touch(name)makes any widget a thumb control. While a finger is on it, a scene'sonPadhears pad -1:nameis 1 while the finger is down and 0 once it lifts, andnameXandnameYare where on the widget it is, -1 to 1 from the middle and held inside a circle. Every finger is followed on its own, so a stick and a button can be held together, and the widget's box is taken when the finger goes down, so a repaint under it moves nothing. The page neither scrolls nor zooms under one.
Tooling
hive test <directory>runs every test under it that git does not ignore, plus those of anything outside it that a file inside imports, each file's tests once.
Breaking
| was | is |
|---|---|
hive.crypto.encrypt(text, password) |
hive.crypto.encrypt(bypass(text), bypass(password)) |
hive.crypto.decrypt(sealed, password) → Result<Str, _> |
hive.crypto.decrypt(sealed, bypass(password)) → Result<Secret, _> |
hive.crypto.hmacSha256(input, key), hive.crypto.jwtCodec(key) |
bypass(key) |
hive.term.readSecret() → Str |
→ Result<Secret, SecretError>; reveal the Secret for the text |
hive.file.writeSecret(path, text), hive.syslink.setKey(key) |
bypass(text), bypass(key) |
To bootstrap from this release, seed/pinned.txt becomes:
tag: v0.2.12
asset: hivec-linux-amd64
sha256: a9fb972dc42fe5707352b4268c36c77aa3018cd195bf216944f60e014f529f1d