Skip to content

Commit

Permalink
update kcdsa
Browse files Browse the repository at this point in the history
  • Loading branch information
RyuaNerin committed Jan 25, 2024
1 parent 86e9b23 commit 3c17380
Show file tree
Hide file tree
Showing 22 changed files with 907 additions and 1,619 deletions.
13 changes: 8 additions & 5 deletions internal/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ func Bytes(bits int) int {

func ReadBits(dst []byte, rand io.Reader, bits int) ([]byte, error) {
i := Bytes(bits)
if cap(dst) < i {
dst = make([]byte, i)
} else {
for len(dst) < i {
dst = append(dst, 0)

if i < len(dst) {
dst = dst[:i]
} else if len(dst) < i {
if i <= cap(dst) {
dst = dst[:i]
} else {
dst = make([]byte, i)
}
}

Expand Down
61 changes: 0 additions & 61 deletions kcdsa/internal/domain.go

This file was deleted.

162 changes: 0 additions & 162 deletions kcdsa/internal/kcdsa.go

This file was deleted.

86 changes: 0 additions & 86 deletions kcdsa/internal/kcdsa_test.go

This file was deleted.

Loading

0 comments on commit 3c17380

Please sign in to comment.