温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/globals/SubtleCrypto
点击访问原文链接

class SubtleCrypto | globals module | Bun

class SubtleCrypto | globals module | BunBuildDocsReferenceGuidesBlogDiscord/Globals/SubtleCryptoMdecryptMderiveBitsMderiveKeyMdigestMencryptMexportKeyMgenerateKeyMimportKeyMsignMunwrapKeyMverifyMwrapKey

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/Globals/SubtleCryptoMdecryptMderiveBitsMderiveKeyMdigestMencryptMexportKeyMgenerateKeyMimportKeyMsignMunwrapKeyMverifyMwrapKey

class

SubtleCryptoclass SubtleCrypto

This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). Available only in secure contexts.

MDN Reference

decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,key: CryptoKey,data: BufferSource): PromiseArrayBuffer>;deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,baseKey: CryptoKey,length?: null | number): PromiseArrayBuffer>;deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,baseKey: CryptoKey,derivedKeyType: AlgorithmIdentifier | HkdfParams | Pbkdf2Params | AesDerivedKeyParams | HmacImportParams,extractable: boolean,keyUsages: KeyUsage[]): PromiseCryptoKey>;deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,baseKey: CryptoKey,derivedKeyType: AlgorithmIdentifier | HkdfParams | Pbkdf2Params | AesDerivedKeyParams | HmacImportParams,extractable: boolean,keyUsages: IterableKeyUsage>): PromiseCryptoKey>;digest(algorithm: AlgorithmIdentifier,data: BufferSource): PromiseArrayBuffer>;encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,key: CryptoKey,data: BufferSource): PromiseArrayBuffer>;exportKey(format: 'jwk',key: CryptoKey): PromiseJsonWebKey>;exportKey(format: 'spki' | 'pkcs8' | 'raw',key: CryptoKey): PromiseArrayBuffer>;exportKey(format: KeyFormat,key: CryptoKey): PromiseArrayBuffer | JsonWebKey>;generateKey(algorithm: 'Ed25519' | { name: 'Ed25519' },extractable: boolean,keyUsages: readonly 'sign' | 'verify'[]): PromiseCryptoKeyPair>;generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams,extractable: boolean,keyUsages: readonly KeyUsage[]): PromiseCryptoKeyPair>;generateKey(algorithm: Pbkdf2Params | AesKeyGenParams | HmacKeyGenParams,extractable: boolean,keyUsages: readonly KeyUsage[]): PromiseCryptoKey>;generateKey(algorithm: AlgorithmIdentifier,extractable: boolean,keyUsages: KeyUsage[]): PromiseCryptoKeyPair | CryptoKey>;generateKey(algorithm: AlgorithmIdentifier,extractable: boolean,keyUsages: IterableKeyUsage>): PromiseCryptoKeyPair | CryptoKey>;importKey(format: 'jwk',keyData: JsonWebKey,algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm,extractable: boolean,keyUsages: readonly KeyUsage[]): PromiseCryptoKey>;importKey(format: 'spki' | 'pkcs8' | 'raw',keyData: BufferSource,algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm,extractable: boolean,keyUsages: KeyUsage[]): PromiseCryptoKey>;importKey(format: 'spki' | 'pkcs8' | 'raw',keyData: BufferSource,algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm,extractable: boolean,keyUsages: IterableKeyUsage>): PromiseCryptoKey>;sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams,key: CryptoKey,data: BufferSource): PromiseArrayBuffer>;unwrapKey(format: KeyFormat,wrappedKey: BufferSource,unwrappingKey: CryptoKey,unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,unwrappedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm,extractable: boolean,keyUsages: KeyUsage[]): PromiseCryptoKey>;unwrapKey(format: KeyFormat,wrappedKey: BufferSource,unwrappingKey: CryptoKey,unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams,unwrappedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm,extractable: boolean,keyUsages: IterableKeyUsage>): PromiseCryptoKey>;verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams,key: CryptoKey,signature: BufferSource,data: BufferSource): Promiseboolean>;wrapKey(format: KeyFormat,key: CryptoKey,wrappingKey: CryptoKey,wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): PromiseArrayBuffer>;

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

class SubtleCrypto | globals module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). Available only in secure contexts. [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)