Skip to content

Commit

Permalink
Feat: Rename encryption to cryptography
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard committed Jul 23, 2024
1 parent c28db76 commit 8f53312
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions languages/ruby/examples/basic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@

### Encryption tests:
plaintext_data = 'Hello World'
key = infisical.encryption.create_symmetric_key
key = infisical.cryptography.create_symmetric_key

encrypted_data = infisical.encryption.encrypt_symmetric(data: plaintext_data, key: key)
encrypted_data = infisical.cryptography.encrypt_symmetric(data: plaintext_data, key: key)

decrypted_data = infisical.encryption.decrypt_symmetric(
decrypted_data = infisical.cryptography.decrypt_symmetric(
ciphertext: encrypted_data['ciphertext'],
iv: encrypted_data['iv'],
tag: encrypted_data['tag'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

module InfisicalSDK
# Perform encryption
class EncryptionClient
class CryptographyClient
def initialize(command_runner)
@command_runner = command_runner
end
Expand Down
6 changes: 3 additions & 3 deletions languages/ruby/infisical-sdk/lib/infisical-sdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
require_relative 'command_runner'
require_relative 'clients/secrets'
require_relative 'clients/auth'
require_relative 'clients/encryption'
require_relative 'clients/cryptography'

module InfisicalSDK
class InfisicalClient
attr_reader :infisical, :command_runner, :secrets, :auth, :encryption
attr_reader :infisical, :command_runner, :secrets, :auth, :cryptography

def initialize(site_url = nil, cache_ttl = 300)
settings = ClientSettings.new(
Expand All @@ -34,7 +34,7 @@ def initialize(site_url = nil, cache_ttl = 300)
@command_runner = CommandRunner.new(@infisical, @handle)
@secrets = SecretsClient.new(@command_runner)
@auth = AuthClient.new(@command_runner)
@encryption = EncryptionClient.new(@command_runner)
@cryptography = CryptographyClient.new(@command_runner)
end

def free_mem
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module InfisicalSDK
class EncryptionClient
class CryptographyClient
@command_runner: CommandRunner
def initialize: (CommandRunner) -> void

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module InfisicalSDK
attr_reader infisical: InfisicalModule

attr_reader auth: AuthClient
attr_reader encryption: EncryptionClient
attr_reader cryptography: CryptographyClient
attr_reader secrets: SecretsClient

def initialize: (String?, Integer?) -> untyped
Expand Down

0 comments on commit 8f53312

Please sign in to comment.