Skip to content

otplib API Documentation / @otplib/core / requireCryptoPlugin

Function: requireCryptoPlugin()

requireCryptoPlugin<T>(crypto): asserts crypto is T

Defined in: packages/core/src/utils.ts:735

Require crypto plugin to be configured

Type Parameters

T

T

Parameters

crypto

The crypto plugin

T | undefined

Returns

asserts crypto is T

Throws

If crypto plugin is not set

Released under the MIT License.