التشفير باستخدام Fernet

يقوم بتشفير الإدخال باستخدام “Fernet”.

المدخلات: نصالنتيجة: نص

إدخال نصي

شغّل الأداة لعرض النتيجة

أمثلة

Example keys and passwords are public test material.

A newline-delimited weather reading

المدخلات

station=demo
celsius=-12.5

Expected checks

Fernet Decrypt recovers:
73746174696f6e3d64656d6f0a63656c736975733d2d31322e350a
المفتاح
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
A small release manifest

المدخلات

release=2.1.0
artifact=demo.tar.gz

Expected checks

Fernet Decrypt recovers:
72656c656173653d322e312e300a61727469666163743d64656d6f2e7461722e677a0a
المفتاح
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
A repeated status log

المدخلات

ready
ready
ready
ready
ready
ready
ready
ready
ready
ready
ready
ready
ready
ready
ready
ready

Expected checks

Fernet Decrypt recovers:
72656164790a72656164790a72656164790a72656164790a72656164790a72656164790a72656164790a72656164790a72656164790a72656164790a72656164790a72656164790a72656164790a72656164790a72656164790a72656164790a
المفتاح
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
An HTTP-like JSON event

المدخلات

{"event":"deploy","project":"demo","ready":true}

Expected checks

Fernet Decrypt recovers:
7b226576656e74223a226465706c6f79222c2270726f6a656374223a2264656d6f222c227265616479223a747275657d
المفتاح
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
A comma-and-quote CSV row

المدخلات

city,note
Paris,"rain, then sun"

Expected checks

Fernet Decrypt recovers:
636974792c6e6f74650a50617269732c227261696e2c207468656e2073756e220a
المفتاح
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
no secret

المدخلات

This is a secret message.

Expected rejection

Message contains
Secret must be 32 url-safe base64-encoded bytes.
المفتاح
(empty)
valid arguments

المدخلات

This is a secret message.

Expected checks

Matches /^gAAA[\w-]+={0,2}$/
المفتاح
MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=
no input

المدخلات

Expected rejection

Message matches pattern
^gAAA[\w-]+={0,2}$
المفتاح
MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=

أدوات ذات صلة

التشفير / الترميز

مرجع العملية

عرض الوثائق التقنية الأصلية (English)