import { SemanticType } from '../Semantics.js';
/**
 * Supported encryption algorithms for password hashing.
 */
export var PasswordEncryptionAlgorithm;
(function (PasswordEncryptionAlgorithm) {
    /**
     * bcrypt - Industry standard, secure, and widely supported
     */
    PasswordEncryptionAlgorithm["Bcrypt"] = "bcrypt";
    /**
     * Argon2 - Winner of the Password Hashing Competition, very secure
     */
    PasswordEncryptionAlgorithm["Argon2"] = "argon2";
    /**
     * scrypt - Memory-hard function, good for high-security applications
     */
    PasswordEncryptionAlgorithm["Scrypt"] = "scrypt";
})(PasswordEncryptionAlgorithm || (PasswordEncryptionAlgorithm = {}));
/**
 * Type guard to check if a semantic is a Password semantic.
 */
export const isPasswordSemantic = (semantic) => {
    return semantic.id === SemanticType.Password;
};
/**
 * Helper function to create a Password semantic with configuration.
 */
export const createPasswordSemantic = (config = {}) => {
    const mergedConfig = {
        ...DEFAULT_PASSWORD_CONFIG,
        ...config,
    };
    if (config.metadata) {
        mergedConfig.metadata = { ...config.metadata };
    }
    return {
        id: SemanticType.Password,
        config: mergedConfig,
    };
};
/**
 * Default configuration for Password semantic.
 */
export const DEFAULT_PASSWORD_CONFIG = {
    requireSpecialChars: true,
    requireNumbers: true,
    requireUppercase: true,
    requireLowercase: true,
    minLength: 8,
    preventReuse: false,
    preventReuseCount: 5,
    allowCommonPasswords: false,
};
//# sourceMappingURL=Password.js.map