Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

Unreleased
------------------
- Updated typings ;
[tex0l]
- Changed the version of the `react-native` peerDependency to `*` to accommodate npm@7's new behaviour.
[tex0l]

1.2.0 - 2020-10-23
------------------
- Unified native I/O to hex strings ;
Expand Down
8 changes: 7 additions & 1 deletion example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,11 @@
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636"
integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A==

"@types/node@^14.14.35":
version "14.14.35"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.35.tgz#42c953a4e2b18ab931f72477e7012172f4ffa313"
integrity sha512-Lt+wj8NVPx0zUmUwumiVXapmaLUcAk3yPuHCFVXras9k5VT9TdhJqKqGVUQCD60OTMCl0qxJ57OiTL0Mic3Iag==

"@types/stack-utils@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e"
Expand Down Expand Up @@ -4871,8 +4876,9 @@ react-native-randombytes@^3.5.1:
sjcl "^1.0.3"

"react-native-scrypt@file:..":
version "1.1.2"
version "1.2.0"
dependencies:
"@types/node" "^14.14.35"
buffer "^5.6.0"

react-native@0.61.4:
Expand Down
37 changes: 32 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
declare module "react-native-scrypt" {
const scrypt: (
// Type definitions for react-native-scrypt 1.2.0
// Project: https://github.com/Crypho/react-native-scrypt
// Definitions by: Yiorgis Gozadinos <https://github.com/ggozad>
// Maddi Joyce <https://github.com/maddijoyce>
// Timothée Rebours <https://github.com/tex0l>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0

declare module 'react-native-scrypt' {
function scrypt (
password: string,
salt: number[],
cost?: number,
blocksize?: number,
parallel?: number,
length?: number
) => Promise<string>;
export default scrypt;
length?: number,
encoding?: 'legacy'
): Promise<string>;
function scrypt (
password: Buffer,
salt: Buffer,
cost?: number,
blocksize?: number,
parallel?: number,
length?: number,
encoding?: 'buffer'
): Promise<Buffer>;
function scrypt (
password: string,
salt: string,
cost?: number,
blocksize?: number,
parallel?: number,
length?: number,
encoding?: 'hex' | 'base64'
): Promise<string>;
export default scrypt
}
Loading