We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb0a335 commit 5ea5518Copy full SHA for 5ea5518
1 file changed
packages/react-native-quick-crypto/src/hash.ts
@@ -120,7 +120,7 @@ class Hash extends Stream.Transform {
120
* @param encoding The `encoding` of the return value.
121
*/
122
digest(): Buffer;
123
- digest(encoding: Encoding): Buffer;
+ digest(encoding: Encoding): string;
124
digest(encoding?: Encoding): Buffer | string {
125
const nativeDigest = this.native.digest(encoding);
126
@@ -296,6 +296,12 @@ const internalDigest = (
296
return arrayBuffer;
297
};
298
299
+export function hash(
300
+ algorithm: string,
301
+ data: BinaryLike,
302
+ outputEncoding: Encoding,
303
+): string;
304
+export function hash(algorithm: string, data: BinaryLike): Buffer;
305
export function hash(
306
algorithm: string,
307
data: BinaryLike,
0 commit comments