mirror of
https://github.com/honojs/hono.git
synced 2024-11-21 18:18:57 +01:00
fix(utils/crypto): fix types of crypto utility (#3614)
* fix(utils/crypto): fix types of crypto utility * fix lint
This commit is contained in:
parent
22db73f461
commit
d717a4fabf
@ -3,12 +3,14 @@
|
|||||||
* Crypto utility.
|
* Crypto utility.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import type { JSONValue } from './types'
|
||||||
|
|
||||||
type Algorithm = {
|
type Algorithm = {
|
||||||
name: string
|
name: string
|
||||||
alias: 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> => {
|
export const sha256 = async (data: Data): Promise<string | null> => {
|
||||||
const algorithm: Algorithm = { name: 'SHA-256', alias: 'sha256' }
|
const algorithm: Algorithm = { name: 'SHA-256', alias: 'sha256' }
|
||||||
|
Loading…
Reference in New Issue
Block a user