mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-03 18:29:00 +00:00
feat: add hmac
module type definition
This commit is contained in:
parent
21025096a3
commit
2a9ef33c9c
2 changed files with 60 additions and 2 deletions
13
crates/erg_compiler/lib/pystd/hmac.d.er
Normal file
13
crates/erg_compiler/lib/pystd/hmac.d.er
Normal file
|
@ -0,0 +1,13 @@
|
|||
.HMAC!: ClassType
|
||||
.HMAC!.
|
||||
digest_size: Nat
|
||||
block_size: Nat
|
||||
name: Str
|
||||
update!: (self: RefMut(.HMAC!), msg: Bytes) => NoneType
|
||||
digest: (self: Ref(.HMAC!)) -> Bytes
|
||||
hexdigest: (self: Ref(.HMAC!)) -> Str
|
||||
copy: (self: Ref(.HMAC!)) -> .HMAC!
|
||||
|
||||
.compare_digest: (a: Str or Bytes, b: Str or Bytes) -> Bool
|
||||
.new: (key: Bytes, msg := Bytes, digestmod := Str or GenericCallable or GenericModule) -> .HMAC!
|
||||
.digest: (key: Bytes, msg := Bytes, digest := Str or GenericCallable or GenericModule) -> Bytes
|
Loading…
Add table
Add a link
Reference in a new issue