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