Remove remaining base64 conversion.
Version to 0.9.1 More examples/constants.cr Remove unused development dependency.
This commit is contained in:
parent
159c381cef
commit
d577e3b1be
@ -41,3 +41,10 @@ puts ""
|
|||||||
puts "Sodium::Digest::Blake2b::{{ name.id }} #{Sodium::Digest::Blake2b::{{ name.id }}}"
|
puts "Sodium::Digest::Blake2b::{{ name.id }} #{Sodium::Digest::Blake2b::{{ name.id }}}"
|
||||||
{% end %}
|
{% end %}
|
||||||
puts ""
|
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 %}
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
name: sodium
|
name: sodium
|
||||||
version: 0.9.0
|
version: 0.9.1
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- Andrew Hamon <andrew@hamon.cc>
|
- Andrew Hamon <andrew@hamon.cc>
|
||||||
- Didactic Drunk <1479616+didactic-drunk@users.noreply.github.com>
|
- Didactic Drunk <1479616+didactic-drunk@users.noreply.github.com>
|
||||||
|
|
||||||
development_dependencies:
|
|
||||||
ghshard:
|
|
||||||
github: bcardiff/ghshard
|
|
||||||
|
|
||||||
crystal: 0.28.0
|
crystal: 0.28.0
|
||||||
|
|
||||||
license: MIT
|
license: MIT
|
||||||
|
@ -6,13 +6,5 @@ module Sodium
|
|||||||
include Sodium::Wipe
|
include Sodium::Wipe
|
||||||
|
|
||||||
abstract def to_slice : Bytes
|
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
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
module Sodium
|
module Sodium
|
||||||
VERSION = "0.1.0"
|
VERSION = "0.9.0"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user