Chalsa: Allow encrypting > 2gb

This commit is contained in:
Didactic Drunk 2022-05-14 09:11:56 -07:00
parent 28b5467602
commit e58c7e43e2

View File

@ -12,7 +12,7 @@ module Sodium::Cipher
getter! nonce : Bytes? getter! nonce : Bytes?
# Advanced usage. Don't touch. # Advanced usage. Don't touch.
property offset = 0 property offset = 0_u64
def initialize(key : Crypto::Secret | Bytes, nonce = nil) def initialize(key : Crypto::Secret | Bytes, nonce = nil)
raise ArgumentError.new("key must be #{key_size} bytes, got #{key.bytesize}") if key.bytesize != key_size raise ArgumentError.new("key must be #{key_size} bytes, got #{key.bytesize}") if key.bytesize != key_size