BASE64_ENCODE
Sintassi
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> BASE64_ENCODE[BASE64_ENCODE]:::quoted
BASE64_ENCODE --> FUNCPARS1["("]:::quoted
FUNCPARS1 --> FUNCPARS2[parameters]
FUNCPARS2 --> FUNCPARS3[")"]:::quoted
FUNCPARS3 --> End((END))
Scopo
La funzione SQL BASE64_ENCODE converte un oggetto binario in caratteri codificati in base64, come definito nella RFC 4648.
Vedi anche BASE64_DECODE.
Parametri:
- Dati di input (
blob): valore da convertire in caratteri Base64.
Restituisce: l'input binario codificato in caratteri base64 come varchar2.
Esempi
BASE64_ENCODE converte il testo hi prima in un oggetto binario a 7-bit in formato ASCII, e poi nella rappresentazione base64:
select base64_encode(ascii_to_blob('hi'))
--------
aGk=
BASE64_ENCODE mappa un testo ASCII più lungo 7-bit alla rappresentazione base64:
select base64_encode(ascii_to_blob('This is a base64 test'))
----------------------------------------------------
VGhpcyBpcyBhIGJhc2U2NCB0ZXN0