Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenSecretCloud/opensecret
/ functions
Functions
1,278 in github.com/OpenSecretCloud/opensecret
⨍
Functions
1,278
◇
Types & classes
392
↓ 2 callers
Function
build_prompt
Return (messages, total_prompt_tokens) Optimized two-pass approach: 1. Fetch metadata only (lightweight, no decryption) 2. Run truncation logic on me
src/web/responses/context_builder.rs:67
↓ 2 callers
Function
build_provider_tools
(request_tools: &Option<Value>)
src/web/responses/handlers.rs:173
↓ 2 callers
Function
build_usage
Helper function to build ResponseUsage from token counts # Arguments `prompt_tokens` - Number of input tokens `completion_tokens` - Number of output
src/web/responses/builders.rs:218
↓ 2 callers
Function
build_usage_event
( user_id: Uuid, usage: CompletionUsage, estimated_cost: BigDecimal, is_api_request: bool,
src/web/openai.rs:1265
↓ 2 callers
Function
canonicalize_response_model
(json: &mut Value, response_model_id: &str)
src/web/openai.rs:1141
↓ 2 callers
Method
catalog_json
(self)
src/model_config.rs:216
↓ 2 callers
Method
content
Set the content parts
src/web/responses/builders.rs:170
↓ 2 callers
Function
copy_victim_seed_wrap_ciphertext_to_attacker_for_kind
( app_state: &AppState, victim: &User, attacker: &User, credential_kind: CredentialKind, )
src/aead_db_tamper_tests.rs:1599
↓ 2 callers
Function
create_assistant_message_if_missing
( db: &Arc<dyn DBConnection + Send + Sync>, conversation_id: i64, response_id: i64, user_id: U
src/web/responses/storage.rs:55
↓ 2 callers
Method
create_email_verification
( &self, new_verification: NewEmailVerification, )
src/db.rs:888
↓ 2 callers
Method
create_enclave_secret
( &self, new_secret: NewEnclaveSecret, )
src/db.rs:855
↓ 2 callers
Method
create_oauth_seed_wrap_for_user
( &self, user: &User, provider_name: &str, provider_user_id: &str, pla
src/main.rs:1135
↓ 2 callers
Method
create_org_project_secret
Org project secret implementations
src/db.rs:1369
↓ 2 callers
Method
create_platform_email_verification
Platform email verification implementations
src/db.rs:1883
↓ 2 callers
Function
create_tool_output_chat_msg
( tool_call_id: uuid::Uuid, output: &str, tokens: usize, )
src/web/responses/context_builder.rs:1271
↓ 2 callers
Method
create_user_api_key
User API key implementations
src/db.rs:2031
↓ 2 callers
Method
create_user_oauth_connection
User OAuth Connection method implementations
src/db.rs:1141
↓ 2 callers
Function
decrypt_aead_v1
( encryption_key: &AeadKey, bytes: &[u8], aad: &[u8], )
src/encrypt.rs:136
↓ 2 callers
Function
decrypt_instruction
( user_key: &secp256k1::SecretKey, prompt_enc: &[u8], prompt_tokens: i32, )
src/web/responses/context_builder.rs:50
↓ 2 callers
Function
decrypt_key_deterministic
( encryption_key: &SecretKey, encrypted: &[u8], )
src/encrypt.rs:312
↓ 2 callers
Function
decrypt_project_instruction
( user_key: &secp256k1::SecretKey, instruction: Option<crate::models::responses::UserInstruction>, )
src/web/responses/conversation_projects.rs:131
↓ 2 callers
Function
decrypt_user_seed_to_mnemonic
( enclave_key: Vec<u8>, encrypted_seed: Vec<u8>, )
src/private_key.rs:95
↓ 2 callers
Function
default_limit
()
src/web/responses/conversations.rs:291
↓ 2 callers
Function
default_order
()
src/web/responses/conversations.rs:295
↓ 2 callers
Method
delete_conversation
(&self, conversation_id: i64, user_id: Uuid)
src/db.rs:2406
↓ 2 callers
Function
derive_key_with_optional_salt
( input_key: &[u8], salt: Option<&[u8]>, info: &[u8], )
src/encrypt.rs:99
↓ 2 callers
Function
derive_mnemonic_to_key
( root_mnemonic: Mnemonic, derivation_path: Option<&str>, seed_phrase_derivation_path: Option<&str
src/private_key.rs:62
↓ 2 callers
Function
derive_seed_wrap_aead_key
( root_key: &[u8], auth_binding: &AuthBinding, )
src/seed_wrapping.rs:208
↓ 2 callers
Method
emit_without_sequence
Emit an event without incrementing the sequence number Useful for error events or special cases where sequence continuity should not be affected.
src/web/responses/events.rs:97
↓ 2 callers
Function
encrypt_aead_v1
( encryption_key: &AeadKey, plaintext: &[u8], aad: &[u8], )
src/encrypt.rs:111
↓ 2 callers
Function
encrypt_event
Helper to create encrypted SSE event
src/web/responses/handlers.rs:3443
↓ 2 callers
Function
ensure_message_started
( current_message_id: &mut Option<Uuid>, next_message_id: &mut Option<Uuid>, tx_storage: &mpsc::Se
src/web/responses/handlers.rs:2348
↓ 2 callers
Function
execute_web_search
Execute web search using Brave Search API Requires a Brave client to be provided (initialized at startup with connection pooling).
src/web/responses/tools.rs:25
↓ 2 callers
Function
extend_key
(key: &[u8; 32])
src/encrypt.rs:325
↓ 2 callers
Function
finalize_assistant_message
( db: &Arc<dyn DBConnection + Send + Sync>, user_key: &SecretKey, item_id: Uuid, content: Stri
src/web/responses/storage.rs:112
↓ 2 callers
Function
finalize_first_model_tool_call
(tool_calls: &[StreamedToolCall])
src/web/responses/handlers.rs:277
↓ 2 callers
Function
finalize_reasoning_item
( db: &Arc<dyn DBConnection + Send + Sync>, user_key: &SecretKey, item_id: Uuid, content: Stri
src/web/responses/storage.rs:161
↓ 2 callers
Function
first_active_project
(app_state: &AppState)
src/web/oauth_routes.rs:1681
↓ 2 callers
Method
generate_alphanumeric_code
(&self)
src/main.rs:1733
↓ 2 callers
Function
generate_random_bytes_from_enclave
( aws_region: &str, aws_key_id: &str, aws_secret_key: &str, aws_session_token: &str, lengt
src/encrypt.rs:484
↓ 2 callers
Method
get_all_org_memberships_for_platform_user
( &self, platform_user_id: Uuid, )
src/db.rs:1626
↓ 2 callers
Method
get_all_user_api_keys_for_user
(&self, user_id: Uuid)
src/db.rs:2062
↓ 2 callers
Method
get_bool_flag
( &self, user_uuid: Uuid, key: &str, )
src/os_flags.rs:193
↓ 2 callers
Method
get_conversation_context_messages
Context reconstruction
src/db.rs:2898
↓ 2 callers
Method
get_email_settings
(&self)
src/models/project_settings.rs:90
↓ 2 callers
Method
get_oauth_settings
(&self)
src/models/project_settings.rs:95
↓ 2 callers
Method
get_platform_email_verification_by_platform_user_id
( &self, platform_user_id: Uuid, )
src/db.rs:1908
↓ 2 callers
Method
get_platform_user_by_uuid
(&self, uuid: Uuid)
src/db.rs:1534
↓ 2 callers
Method
get_project_instruction
( &self, project_id: i64, user_id: Uuid, )
src/db.rs:2514
↓ 2 callers
Function
get_project_oauth_client
( app_state: &AppState, project_id: i32, provider_name: &str, )
src/web/oauth_routes.rs:212
↓ 2 callers
Method
get_project_settings
Project settings methods
src/db.rs:1780
↓ 2 callers
Method
get_response_by_uuid_and_user
( &self, uuid: Uuid, user_id: Uuid, )
src/db.rs:2427
↓ 2 callers
Method
get_tool_schema
(&self, tool_name: &str)
src/web/responses/tools.rs:219
↓ 2 callers
Function
handle_new_user_registration
( data: &AppState, user: &User, requires_email_verification: bool, )
src/web/login_routes.rs:297
↓ 2 callers
Method
insert
(&self, key: UserFlagsCacheKey, response: UserFlagsResponse)
src/os_flags.rs:105
↓ 2 callers
Method
is_missing
(&self)
src/web/responses/types.rs:80
↓ 2 callers
Method
json
(self)
src/model_config.rs:294
↓ 2 callers
Method
list
(&self, user: &User, auth_context: &AuthContext)
src/main.rs:1464
↓ 2 callers
Method
load
Load instruction and user's encryption key in one operation Verifies instruction exists, user owns it, and retrieves encryption key. # Arguments `st
src/web/responses/instructions.rs:62
↓ 2 callers
Function
login_internal
(data: Arc<AppState>, creds: Credentials)
src/web/login_routes.rs:146
↓ 2 callers
Function
map_batch_conversation_project_error
Map batch conversation project update errors to API errors
src/web/responses/errors.rs:36
↓ 2 callers
Function
map_conversation_error
Map conversation-related database errors to API errors # Arguments `e` - The database error to map # Returns Appropriate ApiError with logging
src/web/responses/errors.rs:21
↓ 2 callers
Function
map_conversation_project_error
Map conversation-project-related database errors to API errors
src/web/responses/errors.rs:51
↓ 2 callers
Method
mark_as_deleted
(&self, conn: &mut PgConnection)
src/models/account_deletion.rs:50
↓ 2 callers
Method
mark_as_reset
(&self, conn: &mut PgConnection)
src/models/password_reset.rs:41
↓ 2 callers
Method
mark_as_used
(&self, conn: &mut PgConnection)
src/models/invite_codes.rs:86
↓ 2 callers
Function
merge_transcriptions
( results: Vec<(usize, serde_json::Value)>, )
src/web/audio_utils.rs:335
↓ 2 callers
Method
metadata
Set the metadata # Arguments `metadata` - Optional JSON metadata
src/web/responses/builders.rs:122
↓ 2 callers
Function
model_catalog_response
()
src/model_config.rs:499
↓ 2 callers
Method
model_config
(&self, public_model_id: &str)
src/provider_routing.rs:339
↓ 2 callers
Method
new_oauth_seed_wrapping_for_user
( &self, user: &User, provider_name: &str, provider_user_id: &str, pla
src/main.rs:1087
↓ 2 callers
Function
normalize_guest_login_identifier
(user_uuid: Uuid)
src/seed_wrapping.rs:61
↓ 2 callers
Function
openai_models_response
()
src/model_config.rs:533
↓ 2 callers
Method
password_auth_context_for_user
( &self, user: &User, decrypted_password_verifier: &str, )
src/main.rs:883
↓ 2 callers
Function
password_credential_lookup_hash
( root_key: &[u8], project_id: i32, user_uuid: Uuid, )
src/seed_wrapping.rs:131
↓ 2 callers
Function
plaintext_user_seed_to_key
( plaintext_seed: &[u8], derivation_path: Option<&str>, seed_phrase_derivation_path: Option<&str>,
src/private_key.rs:53
↓ 2 callers
Function
plaintext_user_seed_to_mnemonic
(plaintext_seed: &[u8])
src/private_key.rs:45
↓ 2 callers
Method
public_key
(&self)
src/jwt.rs:72
↓ 2 callers
Method
put
( &self, user: &User, auth_context: &AuthContext, key: String, value:
src/main.rs:1425
↓ 2 callers
Function
read_vsock_response_string_limited
( stream: &mut VsockStream, max_bytes: u64, )
src/aws_credentials.rs:21
↓ 2 callers
Method
register_user
(&self, creds: RegisterCredentials)
src/main.rs:1226
↓ 2 callers
Function
response
(user_uuid: Uuid)
src/os_flags.rs:245
↓ 2 callers
Function
seed_wrap_aad_v1
( user_uuid: Uuid, project_id: i32, credential_kind: CredentialKind, auth_binding: &AuthBindin
src/seed_wrapping.rs:220
↓ 2 callers
Function
send_platform_verification_email
( app_state: &crate::AppState, resend_api_key: Option<String>, to_email: String, verification_
src/email.rs:607
↓ 2 callers
Function
send_transcription_request
( client: &Client<HttpsConnector<hyper::client::HttpConnector>, HyperBody>, provider: &ProxyConfig,
src/web/openai.rs:1729
↓ 2 callers
Function
send_verification_email
( app_state: &crate::AppState, project_id: i32, to_email: String, verification_code: uuid::Uui
src/email.rs:384
↓ 2 callers
Function
set_vsock_timeouts
( stream: &VsockStream, timeout: Duration, )
src/aws_credentials.rs:12
↓ 2 callers
Function
shouldSkipHeader
(name string)
tinfoil-proxy/main.go:73
↓ 2 callers
Function
should_enable_web_search_tool
(state: &AppState, body: &ResponsesCreateRequest)
src/web/responses/handlers.rs:147
↓ 2 callers
Method
single
(message: &crate::models::responses::RawThreadMessageMetadata)
src/web/responses/context_builder.rs:37
↓ 2 callers
Function
strip_provider_managed_request_fields
(body: &mut serde_json::Map<String, Value>)
src/web/openai.rs:1109
↓ 2 callers
Function
transcription_model_for_provider
(model_name: &str, provider_name: &str)
src/web/openai.rs:1401
↓ 2 callers
Method
update_platform_user_password
( &self, user: &PlatformUser, new_password: String, )
src/main.rs:1953
↓ 2 callers
Method
update_project_email_settings
( &self, project_id: i32, settings: EmailSettings, )
src/db.rs:1828
↓ 2 callers
Method
update_project_oauth_settings
( &self, project_id: i32, settings: OAuthSettings, )
src/db.rs:1861
↓ 2 callers
Function
update_provider_connection
( app_state: &AppState, connection: &UserOAuthConnection, token: &str, )
src/web/oauth_routes.rs:1448
↓ 2 callers
Method
upstreamURL
(path, rawQuery string)
tinfoil-proxy/main.go:63
↓ 2 callers
Function
validate_apple_native_token
Validates an Apple ID token using the provided verifier
src/apple_signin.rs:298
↓ 2 callers
Function
validate_conversation_project_limit
( existing_project_count: i64, )
src/models/responses.rs:43
↓ 2 callers
Function
validate_metadata
(metadata: &Value)
src/web/responses/conversations.rs:323
← previous
next →
201–300 of 1,278, ranked by callers