Update TypeScript to 4.4.2
This commit is contained in:
parent
853e27e9eb
commit
a43abe628a
10 changed files with 21 additions and 462 deletions
|
@ -15,105 +15,6 @@ import {
|
|||
typedArrayToArrayBuffer,
|
||||
} from '../Crypto';
|
||||
|
||||
declare global {
|
||||
// this is fixed in already, and won't be necessary when the new definitions
|
||||
// files are used: https://github.com/microsoft/TSJS-lib-generator/pull/843
|
||||
// We want to extend `SubtleCrypto`, so we need an interface.
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
export interface SubtleCrypto {
|
||||
decrypt(
|
||||
algorithm:
|
||||
| string
|
||||
| RsaOaepParams
|
||||
| AesCtrParams
|
||||
| AesCbcParams
|
||||
| AesCmacParams
|
||||
| AesGcmParams
|
||||
| AesCfbParams,
|
||||
key: CryptoKey,
|
||||
data:
|
||||
| Int8Array
|
||||
| Int16Array
|
||||
| Int32Array
|
||||
| Uint8Array
|
||||
| Uint16Array
|
||||
| Uint32Array
|
||||
| Uint8ClampedArray
|
||||
| Float32Array
|
||||
| Float64Array
|
||||
| DataView
|
||||
| ArrayBuffer
|
||||
): Promise<ArrayBuffer>;
|
||||
|
||||
digest(
|
||||
algorithm: string | Algorithm,
|
||||
data:
|
||||
| Int8Array
|
||||
| Int16Array
|
||||
| Int32Array
|
||||
| Uint8Array
|
||||
| Uint16Array
|
||||
| Uint32Array
|
||||
| Uint8ClampedArray
|
||||
| Float32Array
|
||||
| Float64Array
|
||||
| DataView
|
||||
| ArrayBuffer
|
||||
): Promise<ArrayBuffer>;
|
||||
|
||||
importKey(
|
||||
format: 'raw' | 'pkcs8' | 'spki',
|
||||
keyData:
|
||||
| Int8Array
|
||||
| Int16Array
|
||||
| Int32Array
|
||||
| Uint8Array
|
||||
| Uint16Array
|
||||
| Uint32Array
|
||||
| Uint8ClampedArray
|
||||
| Float32Array
|
||||
| Float64Array
|
||||
| DataView
|
||||
| ArrayBuffer,
|
||||
algorithm:
|
||||
| string
|
||||
| RsaHashedImportParams
|
||||
| EcKeyImportParams
|
||||
| HmacImportParams
|
||||
| DhImportKeyParams
|
||||
| AesKeyAlgorithm,
|
||||
extractable: boolean,
|
||||
keyUsages: Array<string>
|
||||
): Promise<CryptoKey>;
|
||||
|
||||
importKey(
|
||||
format: string,
|
||||
keyData:
|
||||
| JsonWebKey
|
||||
| Int8Array
|
||||
| Int16Array
|
||||
| Int32Array
|
||||
| Uint8Array
|
||||
| Uint16Array
|
||||
| Uint32Array
|
||||
| Uint8ClampedArray
|
||||
| Float32Array
|
||||
| Float64Array
|
||||
| DataView
|
||||
| ArrayBuffer,
|
||||
algorithm:
|
||||
| string
|
||||
| RsaHashedImportParams
|
||||
| EcKeyImportParams
|
||||
| HmacImportParams
|
||||
| DhImportKeyParams
|
||||
| AesKeyAlgorithm,
|
||||
extractable: boolean,
|
||||
keyUsages: Array<string>
|
||||
): Promise<CryptoKey>;
|
||||
}
|
||||
}
|
||||
|
||||
const PROFILE_IV_LENGTH = 12; // bytes
|
||||
const PROFILE_KEY_LENGTH = 32; // bytes
|
||||
const PROFILE_TAG_LENGTH = 128; // bits
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue