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
↓ 291 callers
Method
get
( conn: &mut PgConnection, lookup_name: &str, )
src/models/app_data_migrations.rs:21
↓ 105 callers
Function
encrypt_response
( state: &AppState, session_id: &Uuid, response: &T, )
src/web/encryption_middleware.rs:90
↓ 98 callers
Method
insert
(&self, conn: &mut PgConnection)
src/models/orgs.rs:93
↓ 87 callers
Method
as_bytes
(&self)
src/seed_wrapping.rs:73
↓ 55 callers
Function
delete
( pool: &diesel::r2d2::Pool<diesel::r2d2::ConnectionManager<PgConnection>>, user_id: Uuid, key: &s
src/kv.rs:100
↓ 52 callers
Method
as_str
(&self)
src/models/org_memberships.rs:24
↓ 36 callers
Function
get
Update the get function
src/kv.rs:39
↓ 35 callers
Function
encrypt_with_key
(encryption_key: &SecretKey, bytes: &[u8])
src/encrypt.rs:38
↓ 30 callers
Function
decrypt_with_key
(encryption_key: &SecretKey, bytes: &[u8])
src/encrypt.rs:54
↓ 26 callers
Function
test_credential
(label: &str)
src/aead_db_tamper_tests.rs:36
↓ 25 callers
Method
authenticate_user
( &self, user_email: Option<String>, user_id: Option<Uuid>, user_password: Str
src/main.rs:1287
↓ 25 callers
Method
get_user_key
Returns the user's private key, optionally derived using the provided derivation paths. # Arguments `user` - The authenticated user `auth_context` -
src/main.rs:1366
↓ 25 callers
Method
update
(&self, conn: &mut PgConnection)
src/models/orgs.rs:61
↓ 24 callers
Method
status
Set the status of the response # Arguments `status` - Status constant (e.g., STATUS_IN_PROGRESS, STATUS_COMPLETED)
src/web/responses/builders.rs:95
↓ 23 callers
Method
as_str
(self)
src/jwt.rs:103
↓ 23 callers
Method
delete_user
(&self, user: &User)
src/db.rs:2132
↓ 23 callers
Function
extract_function_body
(source: &'a str, signature: &str)
src/security_invariants.rs:809
↓ 23 callers
Method
into_response
(self)
src/main.rs:333
↓ 22 callers
Method
get_org_membership_by_platform_user_and_org
( &self, platform_user_id: Uuid, org_id: i32, )
src/db.rs:1591
↓ 20 callers
Method
get_org_by_uuid
(&self, uuid: Uuid)
src/db.rs:1236
↓ 18 callers
Function
count_tokens
Count tokens for a piece of UTF‑8 text.
src/tokens.rs:14
↓ 18 callers
Method
get_credentials
(&self)
src/aws_credentials.rs:90
↓ 18 callers
Method
verify_seed_wrap_for_auth_context
( &self, user: &User, auth_context: &AuthContext, )
src/main.rs:967
↓ 17 callers
Function
build_prompt_from_chat_messages
Build prompt from chat messages - pure function for testing
src/web/responses/context_builder.rs:550
↓ 17 callers
Method
get_pool
(&self)
src/db.rs:851
↓ 16 callers
Function
create_chat_msg
Helper to create a ChatMsg
src/web/responses/context_builder.rs:862
↓ 16 callers
Function
create_password_wrapped_user
( app_state: &AppState, project_id: i32, email: String, password: &str, )
src/aead_db_tamper_tests.rs:1357
↓ 15 callers
Method
event_type
Get the event type string for SSE
src/web/responses/events.rs:151
↓ 14 callers
Method
append_str
(&mut self, value: &str)
src/encrypt.rs:173
↓ 14 callers
Function
build_local_test_app_state
(database_url: String)
src/aead_db_tamper_tests.rs:1127
↓ 14 callers
Function
decrypt_with_kms
( aws_region: &str, aws_key_id: &str, aws_secret_key: &str, aws_session_token: &str, ciphe
src/encrypt.rs:331
↓ 14 callers
Method
delete
(&self, conn: &mut PgConnection)
src/models/orgs.rs:73
↓ 14 callers
Function
first_active_project
(app_state: &AppState)
src/aead_db_tamper_tests.rs:1141
↓ 14 callers
Method
get_enclave_secret_by_key
(&self, key: &str)
src/db.rs:868
↓ 14 callers
Function
map_decryption_error
Map decryption errors to API errors # Arguments `context` - Description of what was being decrypted (for logging) # Returns ApiError with logging
src/web/responses/errors.rs:136
↓ 13 callers
Method
emit
Emit an SSE event with automatic serialization, encryption, and error handling This method: 1. Serializes the event data to JSON 2. Encrypts the JSON
src/web/responses/events.rs:63
↓ 13 callers
Function
uuid_for_bucket
(bucket: u8)
src/provider_routing.rs:414
↓ 12 callers
Function
decrypt_string
Decrypt encrypted content as a plain UTF-8 string This is a high-level helper for decrypting plain text content (not JSON). Important**: If `encrypt
src/encrypt.rs:292
↓ 12 callers
Method
validate
(&self)
src/web/responses/conversations.rs:268
↓ 11 callers
Method
into_bytes
(self)
src/encrypt.rs:193
↓ 10 callers
Method
build
Build the final ResponsesCreateResponse Consumes the builder and returns the constructed response.
src/web/responses/builders.rs:130
↓ 10 callers
Function
encrypt_seed_v1
( root_key: &[u8], plaintext_seed: &[u8], user_uuid: Uuid, project_id: i32, credential_kin
src/seed_wrapping.rs:182
↓ 10 callers
Method
get_oauth_provider_by_name
(&self, name: &str)
src/db.rs:1120
↓ 10 callers
Method
get_org_project_by_uuid
(&self, uuid: Uuid)
src/db.rs:1300
↓ 10 callers
Method
is_guest
(&self)
src/models/users.rs:108
↓ 10 callers
Function
map_key_retrieval_error
Map key retrieval errors to API errors # Returns ApiError with logging
src/web/responses/errors.rs:145
↓ 10 callers
Function
model_config
(model: &str)
src/model_config.rs:461
↓ 10 callers
Function
send_storage_message
( tx_storage: &mpsc::Sender<StorageMessage>, tx_client: &mpsc::Sender<StorageMessage>, msg: Storag
src/web/responses/handlers.rs:2284
↓ 9 callers
Function
compute_password_auth_binding
( root_key: &[u8], project_id: i32, user_uuid: Uuid, login_identifier_kind: PasswordLoginIdent
src/seed_wrapping.rs:87
↓ 9 callers
Function
decrypt_seed_v1
( root_key: &[u8], encrypted_seed: &[u8], user_uuid: Uuid, project_id: i32, credential_kin
src/seed_wrapping.rs:195
↓ 9 callers
Method
get_email
(&self)
src/models/users.rs:91
↓ 9 callers
Function
password_binding
()
src/seed_wrapping.rs:263
↓ 9 callers
Method
select_completion_route
( &self, proxy_router: &ProxyRouter, account_uuid: Uuid, requested_model: &str
src/provider_routing.rs:160
↓ 8 callers
Function
decrypt_and_derive_bip85_mnemonic
( enclave_key: Vec<u8>, encrypted_seed: Vec<u8>, bip85_path: &str, )
src/private_key.rs:127
↓ 8 callers
Function
encrypt_key_deterministic
(encryption_key: &SecretKey, key: &[u8])
src/encrypt.rs:304
↓ 8 callers
Method
get_org_project_by_client_id
(&self, client_id: Uuid)
src/db.rs:1309
↓ 8 callers
Method
get_org_project_secret_by_key_name_and_project
( &self, key_name: &str, project_id: i32, )
src/db.rs:1391
↓ 8 callers
Method
get_user_by_email
(&self, email: String, project_id: i32)
src/db.rs:763
↓ 8 callers
Method
validate
Validates both derivation paths if present.
src/web/protected_routes.rs:136
↓ 7 callers
Function
build_model_turn_request
( body: &ResponsesCreateRequest, prompt_messages: &[Value], tools_enabled: bool, )
src/web/responses/handlers.rs:203
↓ 7 callers
Method
confirm_password_reset
( &self, email: String, alphanumeric_code: String, plaintext_secret: String,
src/main.rs:1641
↓ 7 callers
Function
create_mock_encrypted_seed
Helper to create a mock encrypted seed for testing
src/private_key.rs:227
↓ 7 callers
Method
decrypt_seed_for_auth_context
( &self, user: &User, auth_context: &AuthContext, )
src/main.rs:928
↓ 7 callers
Function
decrypt_user_seed_to_key
( enclave_key: Vec<u8>, encrypted_seed: Vec<u8>, derivation_path: Option<&str>, seed_phrase_de
src/private_key.rs:35
↓ 7 callers
Method
get_org_by_id
(&self, id: i32)
src/db.rs:1227
↓ 7 callers
Method
get_org_project_by_id
(&self, id: i32)
src/db.rs:1291
↓ 7 callers
Method
get_project_oauth_settings
( &self, project_id: i32, )
src/db.rs:1849
↓ 7 callers
Method
get_user_by_uuid
(&self, uuid: Uuid)
src/db.rs:754
↓ 7 callers
Method
get_user_seed_wrappings_for_user_and_kind
( &self, user_id: Uuid, credential_kind: &str, )
src/db.rs:790
↓ 7 callers
Function
password_reset_code_mac
( root_key: &[u8], project_id: i32, user_uuid: Uuid, alphanumeric_code: &str, )
src/seed_wrapping.rs:167
↓ 7 callers
Function
proxy_router_with_both_providers
()
src/provider_routing.rs:406
↓ 7 callers
Function
responses_request_for_model
(model: &str)
src/web/responses/handlers.rs:410
↓ 6 callers
Method
append_i32
(&mut self, value: i32)
src/encrypt.rs:185
↓ 6 callers
Method
append_uuid
(&mut self, value: Uuid)
src/encrypt.rs:189
↓ 6 callers
Method
build
(self)
src/web/responses/instructions.rs:229
↓ 6 callers
Function
compute_oauth_auth_binding
( root_key: &[u8], project_id: i32, user_uuid: Uuid, provider: &str, provider_user_id: &st
src/seed_wrapping.rs:110
↓ 6 callers
Function
extract_usage
Helper to extract usage from response JSON
src/web/openai.rs:1056
↓ 6 callers
Function
find_or_create_user_from_oauth
( app_state: &AppState, email: Option<String>, provider_user_id: String, provider_name: &str,
src/web/oauth_routes.rs:1150
↓ 6 callers
Function
generate_twelve_word_seed
( aws_credential_manager: Arc<tokio::sync::RwLock<Option<AwsCredentialManager>>>, )
src/private_key.rs:22
↓ 6 callers
Method
get_conversation_project_by_uuid_and_user
( &self, project_uuid: Uuid, user_id: Uuid, )
src/db.rs:2226
↓ 6 callers
Method
get_platform_user_by_email
(&self, email: &str)
src/db.rs:1543
↓ 6 callers
Function
get_project_email_settings
( app_state: &crate::AppState, project_id: i32, )
src/email.rs:300
↓ 6 callers
Method
name
(mut self, name: String)
src/web/responses/instructions.rs:219
↓ 6 callers
Method
prompt
(mut self, prompt: String)
src/web/responses/instructions.rs:224
↓ 6 callers
Method
select_completion_route_with_preference
( &self, proxy_router: &ProxyRouter, account_uuid: Uuid, requested_model: &str
src/provider_routing.rs:174
↓ 5 callers
Function
allocate_created_at
( next_created_at: &mut chrono::DateTime<chrono::Utc>, )
src/web/responses/storage.rs:47
↓ 5 callers
Method
append_field
(&mut self, tag: u8, value: &[u8])
src/encrypt.rs:197
↓ 5 callers
Function
apply_responses_model_defaults
( chat_request: &mut Value, config: ResponsesModelConfig, model: &str, )
src/web/responses/handlers.rs:92
↓ 5 callers
Method
build
(self)
src/main.rs:629
↓ 5 callers
Function
generate_random
()
src/encrypt.rs:451
↓ 5 callers
Function
generate_reset_hash
(password: String)
src/main.rs:2641
↓ 5 callers
Method
get_project_email_settings
( &self, project_id: i32, )
src/db.rs:1816
↓ 5 callers
Method
get_project_user_oauth_connection_by_provider_subject
( &self, provider_id: i32, provider_user_id: &str, project_id: i32, )
src/db.rs:1167
↓ 5 callers
Function
hmac_with_root_domain_key
( root_key: &[u8], key_info: &[u8], message: &[u8], )
src/seed_wrapping.rs:235
↓ 5 callers
Function
insert_valid_reset_request_for_user
( app_state: &AppState, project_id: i32, user: &User, reset_code: &str, reset_secret: &str
src/aead_db_tamper_tests.rs:1528
↓ 5 callers
Method
is_user_paid
Check if a user is on a paid plan (not free)
src/billing.rs:109
↓ 5 callers
Method
new_password_seed_wrapping_for_user
( &self, user: &User, decrypted_password_verifier: &str, plaintext_seed: &[u8]
src/main.rs:976
↓ 5 callers
Method
proxyPath
(path string)
tinfoil-proxy/main.go:217
↓ 5 callers
Function
resolve_public_model_id
(model: &str)
src/model_config.rs:453
↓ 5 callers
Function
sanitize_form_field
Sanitize form field values to prevent HTTP header injection attacks Removes or replaces any CRLF sequences that could be used to inject headers
src/web/openai.rs:1722
next →
1–100 of 1,278, ranked by callers