unwrapKey

inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: Algorithm, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)

The unwrapKey() method of the SubtleCrypto interface "unwraps" a key. This means that it takes as its input a key that has been exported and then encrypted (also called "wrapped"). It decrypts the key and then imports it, returning a CryptoKey object that can be used in the Web Crypto API.

MDN Reference


inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: String, unwrappedKeyAlgorithm: String, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: RsaOaepParams, unwrappedKeyAlgorithm: Algorithm, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: RsaOaepParams, unwrappedKeyAlgorithm: String, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCtrParams, unwrappedKeyAlgorithm: Algorithm, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCtrParams, unwrappedKeyAlgorithm: String, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCbcParams, unwrappedKeyAlgorithm: Algorithm, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCbcParams, unwrappedKeyAlgorithm: String, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesGcmParams, unwrappedKeyAlgorithm: Algorithm, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesGcmParams, unwrappedKeyAlgorithm: String, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: RsaHashedImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: String, unwrappedKeyAlgorithm: RsaHashedImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: RsaOaepParams, unwrappedKeyAlgorithm: RsaHashedImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCtrParams, unwrappedKeyAlgorithm: RsaHashedImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCbcParams, unwrappedKeyAlgorithm: RsaHashedImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesGcmParams, unwrappedKeyAlgorithm: RsaHashedImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: EcKeyImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: String, unwrappedKeyAlgorithm: EcKeyImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: RsaOaepParams, unwrappedKeyAlgorithm: EcKeyImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCtrParams, unwrappedKeyAlgorithm: EcKeyImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCbcParams, unwrappedKeyAlgorithm: EcKeyImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesGcmParams, unwrappedKeyAlgorithm: EcKeyImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: HmacImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: String, unwrappedKeyAlgorithm: HmacImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: RsaOaepParams, unwrappedKeyAlgorithm: HmacImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCtrParams, unwrappedKeyAlgorithm: HmacImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCbcParams, unwrappedKeyAlgorithm: HmacImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesGcmParams, unwrappedKeyAlgorithm: HmacImportParams, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: Algorithm, unwrappedKeyAlgorithm: AesKeyAlgorithm, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: String, unwrappedKeyAlgorithm: AesKeyAlgorithm, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: RsaOaepParams, unwrappedKeyAlgorithm: AesKeyAlgorithm, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCtrParams, unwrappedKeyAlgorithm: AesKeyAlgorithm, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCbcParams, unwrappedKeyAlgorithm: AesKeyAlgorithm, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)
inline suspend fun SubtleCrypto.unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesGcmParams, unwrappedKeyAlgorithm: AesKeyAlgorithm, extractable: Boolean, keyUsages: ReadonlyArray<KeyUsage>): CryptoKey(source)