diff --git a/types/bcryptjs/bcryptjs-tests.ts b/types/bcryptjs/bcryptjs-tests.ts
index cd91eb4896..2fc9f0bc0c 100644
--- a/types/bcryptjs/bcryptjs-tests.ts
+++ b/types/bcryptjs/bcryptjs-tests.ts
@@ -3,6 +3,7 @@ import bcryptjs = require("bcryptjs");
let str: string;
let num: number;
let bool: boolean;
+let arr: number[];
let error: Error;
str = bcryptjs.genSaltSync();
@@ -63,3 +64,7 @@ bcryptjs.compare("string1", "string2")
num = bcryptjs.getRounds("string");
str = bcryptjs.getSalt("string");
+
+str = bcryptjs.encodeBase64([1, 2, 3, 4, 5], 5);
+
+arr = bcryptjs.decodeBase64("string", 5);
diff --git a/types/bcryptjs/index.d.ts b/types/bcryptjs/index.d.ts
index b19413c92d..f04cd68834 100644
--- a/types/bcryptjs/index.d.ts
+++ b/types/bcryptjs/index.d.ts
@@ -1,8 +1,10 @@
// Type definitions for bcryptjs v2.4.0
// Project: https://github.com/dcodeIO/bcrypt.js
-// Definitions by: Joshua Filby , Rafael Kraut
+// Definitions by: Joshua Filby
+// Rafael Kraut
+// Branislav HolĂ˝
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
+// TypeScript Version: 2.1
/**
@@ -103,3 +105,19 @@ export declare function getRounds(hash: string): number;
* @return Extracted salt part
*/
export declare function getSalt(hash: string): string;
+
+/**
+ * Encodes a byte array to base64 with up to len bytes of input, using the custom bcrypt alphabet.
+ * @function
+ * @param b Byte array
+ * @param len Maximum input length
+ */
+export declare function encodeBase64(b: Readonly>, len: number): string;
+
+/**
+ * Decodes a base64 encoded string to up to len bytes of output, using the custom bcrypt alphabet.
+ * @function
+ * @param s String to decode
+ * @param len Maximum output length
+ */
+export declare function decodeBase64(s: string, len: number): number[];