# === Vault Agent Injector: Auto-inject secrets into pods ===
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-server
namespace: production
package middleware
import (
"net/http"
)
class PaymentService
def initialize
Stripe.api_key = Rails.application.credentials.stripe[:secret_key]
end
def create_payment_intent(amount:, currency: 'usd')
<?php
declare(strict_types=1);
namespace App\Security;
package auth
import "golang.org/x/crypto/bcrypt"
func HashPassword(pw string, cost int) ([]byte, error) {
if cost == 0 {
class AttachmentContentTypeValidator < ActiveModel::EachValidator
SIGNATURES = {
"image/png" => ["\x89PNG\r\n\x1a\n".b],
"image/jpeg" => ["\xFF\xD8\xFF".b],
"image/gif" => ["GIF87a".b, "GIF89a".b],
"application/pdf" => ["%PDF-".b]
import hmac
import hashlib
import time
from fastapi import Request, HTTPException, status
module Api
module V1
class PostsController < BaseController
before_action :authenticate_user!
def create
CREATE TABLE password_reset_tokens (
id BIGSERIAL PRIMARY KEY,
user_id BIGINT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
token_hash TEXT NOT NULL,
expires_at TIMESTAMPTZ NOT NULL,
used_at TIMESTAMPTZ,
import { randomBytes } from 'crypto';
import { Request, Response, NextFunction } from 'express';
interface CspOptions {
reportOnly?: boolean;
reportUri?: string;
package webhooks
import (
"bytes"
"crypto/hmac"
"crypto/sha256"