Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dd86k/blake2-d
Browse files Browse the repository at this point in the history
  • Loading branch information
dd86k committed Dec 18, 2023
2 parents 144bec2 + 1613c89 commit e570949
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 114 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ on:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
test:
name: Dub Tests
strategy:
matrix:
os: [ubuntu-latest]
dc: [dmd-latest, ldc-latest]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: dlang-community/setup-dlang@v1
- name: 'Build'
run: dub build --compiler=dmd
- name: 'Test'
run: dub test --compiler=dmd
- uses: actions/checkout@v2

- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.dc }}

- name: Run tests
run: dub test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ blake2-d-test-*
*.o
*.obj
*.lst
*.a
*.lib
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# blake2-d

BLAKE2 library written in D implementing the BLAKE2b and BLAKE2s hashing
This is a library written in D implementing the BLAKE2b and BLAKE2s hashing
algorithms and is compatible with the Phobos Digest API (std.digest).

BLAKE2 was introduced in 2015 as IETF RFC 7693. You can visit
The BLAKE2 algorithm was introduced in 2015 as IETF RFC 7693. You can visit
[the website](https://www.blake2.net/) for more information.

Features (still WIP!):
Features (so far):

- [x] BLAKE2b-512 and BLAKE2s-256.
- [x] Supports BLAKE2b and BLAKE2s.
- [x] Custom digest sizes.
- [x] Keying at runtime (Template API).
- [ ] Keying at runtime (OOP API).
Expand Down Expand Up @@ -82,7 +82,9 @@ digest for a one-time use in a short scope, there's `std.typecons.scoped`.

### Keying

Currently, the only way to supply a key is with the `key` function:
A key can be supplied to the digest using the `key` function.

It must be supplied before putting data in.

```d
import std.string : representation;
Expand Down
Loading

0 comments on commit e570949

Please sign in to comment.