Skip to content

Commit

Permalink
expose internal keys
Browse files Browse the repository at this point in the history
  • Loading branch information
fyears committed Mar 23, 2024
1 parent 611e781 commit fe7ce65
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Checkout the repo
uses: actions/checkout@v3
with:
lfs: 'true'
lfs: "true"
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
# with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"name": "@fyears/rclone-crypt",
"version": "0.0.6",
"version": "0.0.7",
"description": "RClone Crypt",
"repository": {
"type": "git",
Expand Down
19 changes: 19 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,25 @@ fileNameEnc=${this.fileNameEnc}
return this;
}

updateInternalKey(
dataKey: Uint8Array,
nameKey: Uint8Array,
nameTweak: Uint8Array
) {
this.dataKey = dataKey;
this.nameKey = nameKey;
this.nameTweak = nameTweak;
return this;
}

getInternalKey() {
return {
dataKey: this.dataKey,
nameKey: this.nameKey,
nameTweak: this.nameTweak,
};
}

// encryptSegment encrypts a path segment
//
// This uses EME with AES.
Expand Down

0 comments on commit fe7ce65

Please sign in to comment.