Skip to content

Commit

Permalink
fix(utils/crypto): fix types of crypto utility (#3614)
Browse files Browse the repository at this point in the history
* fix(utils/crypto): fix types of crypto utility

* fix lint
  • Loading branch information
EdamAme-x authored Nov 4, 2024
1 parent 22db73f commit d717a4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
* Crypto utility.
*/

import type { JSONValue } from './types'

type Algorithm = {
name: string
alias: string
}

type Data = string | boolean | number | object | ArrayBufferView | ArrayBuffer
type Data = string | boolean | number | JSONValue | ArrayBufferView | ArrayBuffer

export const sha256 = async (data: Data): Promise<string | null> => {
const algorithm: Algorithm = { name: 'SHA-256', alias: 'sha256' }
Expand Down

0 comments on commit d717a4f

Please sign in to comment.