dotenvx 5.1.12-aarch64-linux → 5.1.14-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46c43d033709f307caee47cefbd6cb9cf06ebf157898d4178ba2149f124daa25
4
- data.tar.gz: 9878a8d51e75a011746e974bc7a5879a50250ecf4eb380b37a26c15adefee0e6
3
+ metadata.gz: 8de87f9bcb83f65a76b8a3836623256c161cd2c85e96d135866f5eeb0eab3942
4
+ data.tar.gz: 8facf3046581a6b9e5b68f0ea7b437e4501970c87fce5ad1eaf6794e290244d7
5
5
  SHA512:
6
- metadata.gz: 3a185100ea9d22f60d5d2a7331b8dea714823e326d99569a82ba8496e5d1bcf6a08284f0e219dd0a56558874015681cc671584431617649edb9406f1889ccdbb
7
- data.tar.gz: f72d3a9ad0ee4c0018da21ddda726545547ee21249874d71f01b19fb598ab0eccd91338e1d7844b25d1ad16f52178f730083c912a5efe02e4a28d9899c883a28
6
+ metadata.gz: e8dd9373f00a9d4cb93db6cf2e2673c86d232b83e51dfeadbb93a5c1dc59e4e416f0b17edeebbfe4aa5df2defe7bad5a262d980527b2f069bbf3db3d80330f60
7
+ data.tar.gz: 41a045bd2faf493dd89b36c37d9ded8629c8b4f8628cb073bab77e9cc3b36e326c7de7c8fb5d781bb2ca8b6f0bd60b66af9f64a9bbd8a5bc72ca940491ca437c
data/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. See [standa
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 5.1.14 (2026-12-03)
8
+
9
+ - Expose `Dotenvx::Primitives` for key generation, derivation, encryption, decryption, and algorithm detection using the shared Rust implementation.
10
+
11
+ ## 5.1.13 (2026-12-03)
12
+
13
+ - Add built-in ML-KEM-768/AES-256-GCM envelope support through the shared primitives and SDK, including Base64 public keys and private seeds.
14
+
7
15
  ## 5.1.12 (2026-12-02)
8
16
 
9
17
  - Set a valid Mach-O install name in the macOS native gem so it loads on macOS versions that reject an empty name.
data/README.md CHANGED
@@ -115,3 +115,20 @@ The result is a system built entirely from primitives, developers already unders
115
115
  [Read the whitepaper →](https://dotenvx.com/dotenvx.pdf?v=README)
116
116
 
117
117
   
118
+
119
+ ## Primitives
120
+
121
+ Use the same key operations as the CLI without loading files or environment variables:
122
+
123
+ ```ruby
124
+ require "dotenvx/primitives"
125
+
126
+ pair = Dotenvx::Primitives.keypair(algorithm: "mlkem768")
127
+ public_key = Dotenvx::Primitives.derive(pair.fetch("private_key"))
128
+ ciphertext = Dotenvx::Primitives.encrypt(public_key, "hello")
129
+ plaintext = Dotenvx::Primitives.decrypt(pair.fetch("private_key"), ciphertext)
130
+ Dotenvx::Primitives.public_key_algorithm(public_key) # => "mlkem768"
131
+ ```
132
+
133
+ `secp256k1` is the default algorithm. Invalid keys, ciphertext, and unsupported
134
+ algorithms raise `ArgumentError`. Algorithm detection returns `nil` for invalid keys.
Binary file
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "dotenvx"
4
+
5
+ module Dotenvx
6
+ # Key operations shared with the CLI. These methods never read files or ENV.
7
+ module Primitives
8
+ def self.keypair(algorithm: "secp256k1")
9
+ JSON.parse(Native::Primitives.keypair(algorithm))
10
+ end
11
+
12
+ def self.derive(private_key)
13
+ Native::Primitives.derive(private_key)
14
+ end
15
+
16
+ def self.encrypt(public_key, plaintext)
17
+ Native::Primitives.encrypt(public_key, plaintext)
18
+ end
19
+
20
+ def self.decrypt(private_key, ciphertext)
21
+ Native::Primitives.decrypt(private_key, ciphertext)
22
+ end
23
+
24
+ def self.public_key_algorithm(public_key)
25
+ Native::Primitives.public_key_algorithm(public_key)
26
+ end
27
+ end
28
+ end
@@ -1,3 +1,3 @@
1
1
  module Dotenvx
2
- VERSION = "5.1.12"
2
+ VERSION = "5.1.14"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotenvx
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.12
4
+ version: 5.1.14
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - motdotla
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-12-02 00:00:00.000000000 Z
11
+ date: 2026-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -80,6 +80,7 @@ files:
80
80
  - lib/dotenvx/dotenvx_native.so
81
81
  - lib/dotenvx/load.rb
82
82
  - lib/dotenvx/output.rb
83
+ - lib/dotenvx/primitives.rb
83
84
  - lib/dotenvx/rails.rb
84
85
  - lib/dotenvx/version.rb
85
86
  homepage: https://github.com/dotenvx/dotenvx-ruby#readme