Remove remaining base64 conversion.

Version to 0.9.1
More examples/constants.cr
Remove unused development dependency.
master
Didactic Drunk 2019-07-09 15:31:38 -07:00
parent 159c381cef
commit d577e3b1be
4 changed files with 9 additions and 14 deletions

View File

@ -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 %}

View File

@ -1,14 +1,10 @@
name: sodium
version: 0.9.0
version: 0.9.1
authors:
- Andrew Hamon <andrew@hamon.cc>
- Didactic Drunk <1479616+didactic-drunk@users.noreply.github.com>
development_dependencies:
ghshard:
github: bcardiff/ghshard
crystal: 0.28.0
license: MIT

View File

@ -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

View File

@ -1,3 +1,3 @@
module Sodium
VERSION = "0.1.0"
VERSION = "0.9.0"
end