-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,39 @@ | ||
package constants | ||
|
||
const VERSION = "1.0.0" | ||
|
||
// JSSessionKey determines the hardcoded string that gets replaced in db.ts in | ||
// order to have a semi-random value used in encrypting the user's key pair in | ||
// IndexedDB. | ||
// --- Changes to this value must be reflected in db.ts | ||
const JSSessionKey = "JS_SESSION_KEY" | ||
|
||
const CLIUserAgent = "yeetfile-cli" | ||
|
||
const AuthSessionStore = "auth" | ||
|
||
const Argon2Mem uint32 = 64 // MB | ||
const Argon2Iter uint32 = 2 | ||
|
||
const LimiterSeconds = 30 | ||
const LimiterAttempts = 6 | ||
|
||
const TotalBandwidthMultiplier = 3 // 3x available storage | ||
const BandwidthMonitorDuration = 7 // 7 day period | ||
|
||
const IVSize int = 12 | ||
const KeySize int = 32 | ||
const ChunkSize int = 10000000 // 10 mb | ||
const TotalOverhead int = 28 // encryption overhead (16) + iv size (12) | ||
const MaxPlaintextLen = 2000 | ||
const MaxHintLen = 200 | ||
const PlaintextIDPrefix = "text" | ||
const FileIDPrefix = "file" | ||
const VerificationCodeLength = 6 | ||
const ChangeIDLength = 9 | ||
const MaxTransferThreads = 3 | ||
const MaxSendAgeDays = 30 //days | ||
const MaxPassNoteLen = 500 | ||
const RecoveryCodeLen = 8 | ||
|
||
type UpgradeDuration string | ||
|
||
const ( | ||
VERSION = "1.0.0" | ||
|
||
// JSSessionKey determines the hardcoded string that gets replaced in db.ts in | ||
// order to have a semi-random value used in encrypting the user's key pair in | ||
// IndexedDB. | ||
// --- Changes to this value must be reflected in db.ts | ||
JSSessionKey = "JS_SESSION_KEY" | ||
|
||
CLIUserAgent = "yeetfile-cli" | ||
AuthSessionStore = "auth" | ||
Argon2Mem uint32 = 64 // MB | ||
Argon2Iter uint32 = 2 | ||
LimiterSeconds = 30 | ||
LimiterAttempts = 6 | ||
TotalBandwidthMultiplier = 3 // 3x available storage | ||
BandwidthMonitorDuration = 7 // 7 day period | ||
IVSize = 12 | ||
KeySize = 32 | ||
ChunkSize = 10000000 // 10 mb | ||
TotalOverhead = 28 // encryption overhead (16) + iv size (12) | ||
MaxPlaintextLen = 2000 | ||
MaxHintLen = 200 | ||
PlaintextIDPrefix = "text" | ||
FileIDPrefix = "file" | ||
VerificationCodeLength = 6 | ||
ChangeIDLength = 9 | ||
MaxTransferThreads = 3 | ||
MaxSendAgeDays = 30 //days | ||
MaxPassNoteLen = 500 | ||
RecoveryCodeLen = 8 | ||
|
||
DurationMonth UpgradeDuration = "month" | ||
DurationYear UpgradeDuration = "year" | ||
) |