From d577e3b1be19b0bcbd51f46a3d7f14ec109b80fe Mon Sep 17 00:00:00 2001 From: Didactic Drunk <1479616+didactic-drunk@users.noreply.github.com> Date: Tue, 9 Jul 2019 15:31:38 -0700 Subject: [PATCH] Remove remaining base64 conversion. Version to 0.9.1 More examples/constants.cr Remove unused development dependency. --- examples/constants.cr | 7 +++++++ shard.yml | 6 +----- src/sodium/key.cr | 8 -------- src/sodium/version.cr | 2 +- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/examples/constants.cr b/examples/constants.cr index 099f980..907d12c 100644 --- a/examples/constants.cr +++ b/examples/constants.cr @@ -41,3 +41,10 @@ puts "" puts "Sodium::Digest::Blake2b::{{ name.id }} #{Sodium::Digest::Blake2b::{{ name.id }}}" {% end %} puts "" + +{% for sk in [Sodium::CryptoBox::SecretKey, Sodium::Sign::SecretKey] %} + sk = {{sk.id}}.new + pk = sk.public_key + puts "#{sk.class} bytesize #{sk.to_slice.bytesize}" + puts "#{pk.class} bytesize #{pk.to_slice.bytesize}" +{% end %} diff --git a/shard.yml b/shard.yml index 279f5a4..9c5c7fe 100644 --- a/shard.yml +++ b/shard.yml @@ -1,14 +1,10 @@ name: sodium -version: 0.9.0 +version: 0.9.1 authors: - Andrew Hamon - Didactic Drunk <1479616+didactic-drunk@users.noreply.github.com> -development_dependencies: - ghshard: - github: bcardiff/ghshard - crystal: 0.28.0 license: MIT diff --git a/src/sodium/key.cr b/src/sodium/key.cr index ab65faa..d402385 100644 --- a/src/sodium/key.cr +++ b/src/sodium/key.cr @@ -6,13 +6,5 @@ module Sodium include Sodium::Wipe abstract def to_slice : Bytes - - def to_base64 - Base64.encode(to_slice) - end - - def self.from_base64(encoded_key) - new(Base64.decode(encoded_key)) - end end end diff --git a/src/sodium/version.cr b/src/sodium/version.cr index 83bf696..a5143c6 100644 --- a/src/sodium/version.cr +++ b/src/sodium/version.cr @@ -1,3 +1,3 @@ module Sodium - VERSION = "0.1.0" + VERSION = "0.9.0" end