Code Explainers

Code explainers tagged #encryption

java
@Component
@Converter
public class EncryptedStringConverter implements AttributeConverter<String, String> {
 

Transparent column encryption in Spring & JPA

encryption aes-gcm jpa-converter
Advanced 10 steps
go
package signup
 
var wizardCodec = securecookie.New(
	[]byte(os.Getenv("WIZARD_HASH_KEY")),

A cookie-backed signup wizard in Gin

cookies encryption multi-step-form
Intermediate 9 steps
ruby
require "openssl"
require "base64"
 
module SecureToken

Authenticated encryption with AES-GCM in Ruby

encryption aes-gcm authentication
Advanced 8 steps
php
final class FieldEncryptor
{
    private string $key;
 

Authenticated field encryption with libsodium

encryption libsodium authenticated-encryption
Intermediate 7 steps
ruby
class PaymentMethod < ApplicationRecord
  belongs_to :account
 
  encrypts :card_number, deterministic: false

How Rails encrypts sensitive payment fields

encryption validation scopes
Intermediate 9 steps