@@ -26,7 +26,7 @@ const DEFAULT_PERIOD = 30
2626 * Generates a HMAC-based One Time Password (HOTP) using the provided secret and 
2727 * configuration options. 
2828 * 
29-  * @param  {ArrayBuffer } secret - The secret used to generate the HOTP. 
29+  * @param  {BufferSource } secret - The secret used to generate the HOTP. 
3030 * @param  {Object } options - The configuration options for the HOTP. 
3131 * @param  {number } [options.counter=0] - The counter value to use for the HOTP. 
3232 * Defaults to 0. 
@@ -104,7 +104,7 @@ async function generateHOTP(
104104 * configuration options. 
105105 * 
106106 * @param  {string } otp - The OTP to verify. 
107-  * @param  {ArrayBuffer } secret - The secret used to generate the HOTP. 
107+  * @param  {BufferSource } secret - The secret used to generate the HOTP. 
108108 * @param  {Object } options - The configuration options for the HOTP. 
109109 * @param  {number } [options.counter=0] - The counter value to use for the HOTP. 
110110 * Defaults to 0. 
@@ -256,7 +256,7 @@ export async function verifyTOTP({
256256		return  null 
257257	} 
258258
259- 	return  verifyHOTP ( otp ,  new   Uint8Array ( decodedSecret ) ,  { 
259+ 	return  verifyHOTP ( otp ,  decodedSecret ,  { 
260260		counter : getCounter ( period ) , 
261261		digits, 
262262		window, 
@@ -269,7 +269,7 @@ export async function verifyTOTP({
269269 * Converts a number to a byte array. 
270270 * 
271271 * @param  {number } num The number to convert to a byte array. 
272-  * @returns  {Uint8Array } The byte array representation of the number. 
272+  * @returns  {Uint8Array<ArrayBuffer>  } The byte array representation of the number. 
273273 */ 
274274function  intToBytes ( num )  { 
275275	const  arr  =  new  Uint8Array ( 8 ) 
0 commit comments