Skip to content

otplib API Documentation / @otplib/core / utils / requireCryptoPlugin

Function: requireCryptoPlugin() ​

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

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

Require crypto plugin to be configured

Type Parameters ​

T ​

T

Parameters ​

crypto ​

T | undefined

The crypto plugin

Returns ​

asserts crypto is T

Throws ​

If crypto plugin is not set

Released under the MIT License.