-- without padding, input not multiple of block size SELECT encrypt( '\x00112233445566778899aabbccddeeff00', '\x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f', 'aes-cbc/pad:none');
-- decrypt select encode(decrypt(encrypt('foo', '0123456', 'aes'), '0123456', 'aes'), 'escape'); -- data not multiple of block size select encode(decrypt(encrypt('foo', '0123456', 'aes') || '\x00'::bytea, '0123456', 'aes'), 'escape'); -- bad padding -- (The input value is the result of encrypt_iv('abcdefghijklmnopqrstuvwxyz', '0123456', 'abcd', 'aes') -- with the 16th byte changed (s/db/eb/) to corrupt the padding of the last block.) select encode(decrypt_iv('\xa21a9c15231465964e3396d32095e67eb52bab05f556a581621dee1b85385789', '0123456', 'abcd', 'aes'), 'escape');
-- without padding, input not multiple of block size SELECT encrypt( '\x00112233445566778899aabbccddeeff00', '\x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f', 'aes-cfb/pad:none');
-- decrypt select encode(decrypt(encrypt('foo', '0123456', 'aes-cfb'), '0123456', 'aes-cfb'), 'escape'); -- data not multiple of block size select encode(decrypt(encrypt('foo', '0123456', 'aes-cfb') || '\x00'::bytea, '0123456', 'aes-cfb'), 'escape'); -- bad padding -- (The input value is the result of encrypt_iv('abcdefghijklmnopqrstuvwxyz', '0123456', 'abcd', 'aes-cfb') -- with the 16th byte changed (s/c5/d5/) to corrupt the padding of the last block.) select encode(decrypt_iv('\xf9ad6817cb58d31dd9ba6571fbc4f55d56f65b631f0f437cb828', '0123456', 'abcd', 'aes-cfb'), 'escape');
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.