Skip to content

Commit

Permalink
mhutchie#462 Added comment of Encrypt/Decrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
keydepth committed May 2, 2021
1 parent cb58c4e commit 9871083
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/extensionState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export class ExtensionState extends Disposable {
outputSet[repo].showRemoteBranchesV2 = repoSet[repo].showRemoteBranches ? BooleanOverride.Enabled : BooleanOverride.Disabled;
}
}
// Decrypt cicdToken
if (typeof repoSet[repo].cicdConfigs !== 'undefined' && repoSet[repo].cicdConfigs !== null) {
outputSet[repo].cicdConfigs = [];
if (typeof repoSet[repo].cicdNonce !== 'undefined' && repoSet[repo].cicdNonce !== null) {
Expand Down Expand Up @@ -161,6 +162,7 @@ export class ExtensionState extends Disposable {
// Deep Clone gitRepoSet
let gitRepoSetTemp = JSON.parse(JSON.stringify(gitRepoSet));

// Encrypt cicdToken
Object.keys(gitRepoSetTemp).forEach((repo) => {
let ENCRYPTION_KEY = getNonce(); // Must be 256 bits (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
Expand Down

0 comments on commit 9871083

Please sign in to comment.