Encoding, hashing & encryption
Choose Base64URL to embed text in a URL. To compare two texts, calculate the SHA-256 digest of each and compare the results. Spaces and line breaks also affect the digest.
Keep the entire AES ciphertext and the passphrase. You need both to decrypt it. Each encryption uses a fresh salt and IV, so encrypting the same text twice produces different results.