| Test case base64_encode #1 |
| base64_encode:"":"":1000:0 |
| |
| Test case base64_encode #2 |
| base64_encode:"f":"Zg==":1000:0 |
| |
| Test case base64_encode #3 |
| base64_encode:"fo":"Zm8=":1000:0 |
| |
| Test case base64_encode #4 |
| base64_encode:"foo":"Zm9v":1000:0 |
| |
| Test case base64_encode #5 |
| base64_encode:"foob":"Zm9vYg==":1000:0 |
| |
| Test case base64_encode #6 |
| base64_encode:"fooba":"Zm9vYmE=":1000:0 |
| |
| Test case base64_encode #7 |
| base64_encode:"foobar":"Zm9vYmFy":1000:0 |
| |
| Test case base64_decode #1 |
| base64_decode:"":"":0 |
| |
| Test case base64_decode #2 |
| base64_decode:"Zg==":"f":0 |
| |
| Test case base64_decode #3 |
| base64_decode:"Zm8=":"fo":0 |
| |
| Test case base64_decode #4 |
| base64_decode:"Zm9v":"foo":0 |
| |
| Test case base64_decode #5 |
| base64_decode:"Zm9vYg==":"foob":0 |
| |
| Test case base64_decode #6 |
| base64_decode:"Zm9vYmE=":"fooba":0 |
| |
| Test case base64_decode #7 |
| base64_decode:"Zm9vYmFy":"foobar":0 |
| |
| Base64 encode (buffer size just right) |
| base64_encode:"foobar":"Zm9vYmFy":9:0 |
| |
| Base64 encode (buffer size too small) |
| base64_encode:"foobar":"":8:POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL |
| |
| Base64 decode (Illegal character) |
| base64_decode:"zm#=":"":POLARSSL_ERR_BASE64_INVALID_CHARACTER |
| |
| Base64 decode (Too much equal signs) |
| base64_decode:"zm===":"":POLARSSL_ERR_BASE64_INVALID_CHARACTER |
| |
| Base64 decode (Invalid char after equal signs) |
| base64_decode:"zm=masd":"":POLARSSL_ERR_BASE64_INVALID_CHARACTER |
| |
| Base64 encode hex #1 |
| base64_encode_hex:"010203040506070809":"AQIDBAUGBwgJ":13:0 |
| |
| Base64 encode hex #2 (buffer too small) |
| base64_encode_hex:"010203040506070809":"AQIDBAUGBwgJ":12:POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL |
| |
| Base64 encode hex #3 |
| base64_encode_hex:"0102030405060708":"AQIDBAUGBwg=":13:0 |
| |
| Base64 encode hex #4 |
| base64_encode_hex:"01020304050607":"AQIDBAUGBw==":13:0 |
| |
| Base64 decode hex #1 |
| base64_decode_hex:"AQIDBAUGBwgJ":"010203040506070809":9:0 |
| |
| Base64 decode hex #2 (buffer too small) |
| base64_decode_hex:"AQIDBAUGBwgJ":"010203040506070809":8:POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL |
| |
| Base64 decode hex #3 |
| base64_decode_hex:"AQIDBAUGBwg=":"0102030405060708":8:0 |
| |
| Base64 decode hex #4 |
| base64_decode_hex:"AQIDBAUGBw==":"01020304050607":7:0 |
| |
| Base64 decode hex #5 (buffer too small) |
| base64_decode_hex:"AQIDBAUGBw==":"01020304050607":6:POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL |
| |
| Base64 Selftest |
| depends_on:POLARSSL_SELF_TEST |
| base64_selftest: |