Skip to content

Commit a0a6e4c

Browse files
Copilotringabout
andauthored
Add missing sha256 support to fix signedcookiesession compilation error (#283)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
1 parent a26fc51 commit a0a6e4c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/prologue/signing/signing.nim

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ export signingbase
4545

4646

4747
type
48-
BaseDigestType* = sha1 | sha2 | keccak | ripemd | blake2
48+
BaseDigestType* = sha1 | sha224 | sha256 | sha384 | sha512 | sha512_224 | sha512_256 | keccak | ripemd | blake2
4949

5050
BaseDigestMethodType* = enum
5151
Sha1Type,
52-
Sha224Type, Sha384Type, Sha512Type, Sha512_224Type, Sha512_256Type
52+
Sha224Type, Sha256Type, Sha384Type, Sha512Type, Sha512_224Type, Sha512_256Type
5353
Keccak224Type, Keccak256Type, Keccak384Type, Keccak512Type, Sha3_224Type,
5454
Sha3_256Type, Sha3_384Type, Sha3_512Type
5555
Ripemd128Type, Ripemd160Type, Ripemd256Type, Ripemd320Type
@@ -158,6 +158,8 @@ proc getSignatureEncode*(s: Signer | TimedSigner, value: openArray[
158158
result = getKeyDerivationEncode(s, sha1, value)
159159
of Sha224Type:
160160
result = getKeyDerivationEncode(s, sha224, value)
161+
of Sha256Type:
162+
result = getKeyDerivationEncode(s, sha256, value)
161163
of Sha384Type:
162164
result = getKeyDerivationEncode(s, sha384, value)
163165
of Sha512Type:
@@ -205,6 +207,8 @@ proc getSignatureDecode*(s: Signer | TimedSigner): string =
205207
result = getKeyDerivationDecode(s, sha1)
206208
of Sha224Type:
207209
result = getKeyDerivationDecode(s, sha224)
210+
of Sha256Type:
211+
result = getKeyDerivationDecode(s, sha256)
208212
of Sha384Type:
209213
result = getKeyDerivationDecode(s, sha384)
210214
of Sha512Type:

0 commit comments

Comments
 (0)