/** * @module secret constants * * constants are in this file! */ // /** // * example enum-like type+const that I use in ibgib. sometimes i put // * these in the types.mts and sometimes in the const.mts, depending // * on context. // */ // export type SomeEnum = // 'ib' | 'gib'; // export const SomeEnum = { // ib: 'ib' as SomeEnum, // gib: 'gib' as SomeEnum, // } satisfies { [key: string]: SomeEnum }; // export const SOME_TYPE_VALUES: SomeEnum[] = Object.values(SomeEnum); /** * atom used in ibs */ export const SECRET_ATOM = 'secret'; /** * default regexp for a simple name string. */ export const SECRET_NAME_REGEXP = /^[a-zA-Z0-9_\-.]{1,255}$/; /** * A secrets ibgib uses this rel8n name for its children secrets. */ export const SECRET_REL8N_NAME = 'secret'; /** * this is the length of the substring that we'll create when generating partial * hash substrings for password "probably correct" verification. this check is * made only for the user's convenience to see if they "probably" typed in their * password correctly. If they typo the password or just type in the wrong one, * there is an approximately 1/250 chance on average * * @see `SecretInfo_Password.passwordProbablyCorrectInfo` in secret-types.mts * * READ THE DOCS FOR THAT LINK */ export const DEFAULT_PASSWORD_CHECK_SUBSTRING_LENGTH = 4;