Merge pull request #15 from place-labs/fix/aead-chalsa-signature
Fix `#encrypt_detached` for crystal 1.2.0
This commit is contained in:
commit
bbbbcbd856
18
.github/workflows/crystal.yml
vendored
18
.github/workflows/crystal.yml
vendored
@ -9,9 +9,23 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: "crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }}"
|
||||
continue-on-error: ${{ !matrix.stable }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
stable: [true]
|
||||
crystal:
|
||||
- 1.0.0
|
||||
- 1.1.0
|
||||
- 1.1.1
|
||||
- 1.2.0
|
||||
include:
|
||||
- crystal: nightly
|
||||
stable: false
|
||||
|
||||
container:
|
||||
image: crystallang/crystal
|
||||
image: crystallang/crystal:${{ matrix.crystal }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -32,7 +46,6 @@ jobs:
|
||||
run: shards install
|
||||
- name: Run tests
|
||||
run: crystal spec -Dpreview_mt --order random
|
||||
# run: crystal spec -Dpreview_mt --order random --error-on-warnings
|
||||
- name: Run bulid
|
||||
run: shards build -Dpreview_mt
|
||||
- name: Run format
|
||||
@ -40,4 +53,3 @@ jobs:
|
||||
- name: Failed
|
||||
if: ${{ failure() }}
|
||||
run: "[ -f libsodium_install.out ] && cat libsodium_install.out"
|
||||
|
||||
|
@ -4,7 +4,7 @@ version: 1.2.3
|
||||
authors:
|
||||
- Andrew Hamon <andrew@hamon.cc>
|
||||
- Didactic Drunk <1479616+didactic-drunk@users.noreply.github.com>
|
||||
crystal: ">= 0.36.0"
|
||||
crystal: ">= 1.0.0"
|
||||
targets:
|
||||
blake2b_hash:
|
||||
main: examples/blake2b_hash.cr
|
||||
|
@ -103,7 +103,7 @@ module Sodium::Cipher::Aead
|
||||
# `src` and `dst` may be the same object but should not overlap.
|
||||
# May supply `mac`, otherwise a new one is returned.
|
||||
# May supply `additional`
|
||||
def encrypt_detached(src : Bytes, dst : Bytes? = nil, nonce : Sodium::Nonce? = nil, *, mac : Bytes? = nil, additional : String | Bytes | Nil = nil) : {Bytes, Bytes, Sodium::Nonce}
|
||||
def encrypt_detached(src : Bytes, dst : Bytes? = nil, *, nonce : Sodium::Nonce? = nil, mac : Bytes? = nil, additional : String | Bytes | Nil = nil) : {Bytes, Bytes, Sodium::Nonce}
|
||||
dst ||= Bytes.new src.bytesize
|
||||
nonce ||= Sodium::Nonce.random
|
||||
mac ||= Bytes.new MAC_SIZE
|
||||
|
Loading…
Reference in New Issue
Block a user