Skip to content

Commit

Permalink
implement crypto/dsa
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Oct 24, 2023
1 parent ebaf9de commit 6d5d714
Show file tree
Hide file tree
Showing 5 changed files with 765 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cng/cng.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package cng

import (
"encoding/binary"
"errors"
"math"
"runtime"
Expand Down Expand Up @@ -103,6 +104,12 @@ func getUint32(h bcrypt.HANDLE, name string) (uint32, error) {
return prop, err
}

func setUint32(h bcrypt.HANDLE, name string, val uint32) error {
var p [4]byte
binary.LittleEndian.PutUint32(p[:], val)
return bcrypt.SetProperty(h, utf16PtrFromString(name), p[:], 0)
}

const sizeOfKEY_LENGTHS_STRUCT = unsafe.Sizeof(bcrypt.KEY_LENGTHS_STRUCT{})

func getKeyLengths(h bcrypt.HANDLE) (lengths bcrypt.KEY_LENGTHS_STRUCT, err error) {
Expand Down
Loading

0 comments on commit 6d5d714

Please sign in to comment.