Constructors

Properties

createKeyPair: (() => PrivateKey)
decrypt: ((key: Uint8Array, data: Uint8Array, nonce: Uint8Array, aad?: Uint8Array) => Uint8Array)
ecdhGeneratePublicKey: (() => {
    ecdh: any;
    publicKey: Uint8Array;
})
ecdhGeneratePublicKeyAndSecret: ((peerPublicKey: Uint8Array) => {
    publicKey: Uint8Array;
    sharedSecret: Uint8Array;
})
ecdhGenerateSecret: ((peerPublicKey: Uint8Array, ecdh: any) => Uint8Array)
encrypt: ((key: Uint8Array, data: Uint8Array, nonce: Uint8Array, aad?: Uint8Array) => Uint8Array)
get: (() => Crypto)
getRandom: (() => Uint8Array)
getRandomBigInt: ((size: number, maxValue?: bigint) => bigint)
getRandomBigUInt64: (() => bigint)
getRandomData: ((length: number) => Uint8Array)
getRandomUInt16: (() => number)
getRandomUInt32: (() => number)
hash: ((data: Uint8Array | Uint8Array[]) => Uint8Array)
hkdf: ((secret: Uint8Array, salt: Uint8Array, info: Uint8Array, length?: number) => Promise<Uint8Array>)
hmac: ((key: Uint8Array, data: Uint8Array) => Uint8Array)
pbkdf2: ((secret: Uint8Array, salt: Uint8Array, iteration: number, keyLength: number) => Promise<Uint8Array>)
sign: ((privateKey: JsonWebKey, data: Uint8Array | Uint8Array[], dsaEncoding?: CryptoDsaEncoding) => Uint8Array)
verify: ((publicKey: JsonWebKey, data: Uint8Array, signature: Uint8Array, dsaEncoding?: CryptoDsaEncoding) => void)

Methods

  • Returns PrivateKey

  • Parameters

    • key: Uint8Array
    • data: Uint8Array
    • nonce: Uint8Array
    • Optionalaad: Uint8Array

    Returns Uint8Array

  • Returns {
        ecdh: any;
        publicKey: Uint8Array;
    }

    • ecdh: any
    • publicKey: Uint8Array
  • Parameters

    • peerPublicKey: Uint8Array

    Returns {
        publicKey: Uint8Array;
        sharedSecret: Uint8Array;
    }

    • publicKey: Uint8Array
    • sharedSecret: Uint8Array
  • Parameters

    • peerPublicKey: Uint8Array
    • ecdh: any

    Returns Uint8Array

  • Parameters

    • key: Uint8Array
    • data: Uint8Array
    • nonce: Uint8Array
    • Optionalaad: Uint8Array

    Returns Uint8Array

  • Parameters

    • length: number

    Returns Uint8Array

  • Parameters

    • data: Uint8Array | Uint8Array[]

    Returns Uint8Array

  • Parameters

    • secret: Uint8Array
    • salt: Uint8Array
    • info: Uint8Array
    • Optionallength: number

    Returns Promise<Uint8Array>

  • Parameters

    • key: Uint8Array
    • data: Uint8Array

    Returns Uint8Array

  • Parameters

    • secret: Uint8Array
    • salt: Uint8Array
    • iteration: number
    • keyLength: number

    Returns Promise<Uint8Array>

  • Parameters

    • privateKey: JsonWebKey
    • data: Uint8Array | Uint8Array[]
    • OptionaldsaEncoding: CryptoDsaEncoding

    Returns Uint8Array

  • Parameters

    • publicKey: JsonWebKey
    • data: Uint8Array
    • signature: Uint8Array
    • OptionaldsaEncoding: CryptoDsaEncoding

    Returns void