PowerBuilder Base32 Encode Using API
PowerBuilder Base32 Decode Using API
PowerBuilder Base64 Encode Using API
PowerBuilder Base64 Decode Using API
base32/base64 encode/decode with older Powerbuilder versions. Powerbuilder new version supported.
share source code base encoding c++
Code Example.
n_base from nonvisualobject
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
forward global type n_base from nonvisualobject end type end forward global type n_base from nonvisualobject autoinstantiate end type type prototypes Function String GetBase32Encode(String msg) Library "BaseEncoding.dll" Alias For "GetBase32Encode;Ansi" Function String GetBase32Decode(String coded) Library "BaseEncoding.dll" Alias For "GetBase32Decode;Ansi" Function String GetBase64Encode(String msg) Library "BaseEncoding.dll" Alias For "GetBase64Encode;Ansi" Function String GetBase64Decode(String coded) Library "BaseEncoding.dll" Alias For "GetBase64Decode;Ansi" end prototypes forward prototypes public function string of_getbase32encode (string as_msg) public function string of_getbase64encode (string as_msg) public function string of_getbase32decode (string as_code) public function string of_getbase64decode (string as_code) end prototypes public function string of_getbase32encode (string as_msg);//==================================================================== // Function: n_base.of_getbase32encode() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // value string as_msg //-------------------------------------------------------------------- // Returns: string //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2022/05/29 //-------------------------------------------------------------------- // Usage: n_base.of_getbase32encode ( string as_msg ) //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== String ls_coded If IsNull(as_msg) Or Len(Trim(as_msg)) = 0 Then Return "" End If ls_coded = GetBase32Encode(as_msg) Return ls_coded end function public function string of_getbase64encode (string as_msg);//==================================================================== // Function: n_base.of_getbase64encode() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // value string as_msg //-------------------------------------------------------------------- // Returns: string //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2022/05/29 //-------------------------------------------------------------------- // Usage: n_base.of_getbase64encode ( string as_msg ) //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== String ls_coded If IsNull(as_msg) Or Len(Trim(as_msg)) = 0 Then Return "" End If ls_coded = GetBase64Encode(as_msg) Return ls_coded end function public function string of_getbase32decode (string as_code);//==================================================================== // Function: n_base.of_getbase32decode() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // value string as_code //-------------------------------------------------------------------- // Returns: string //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2022/05/29 //-------------------------------------------------------------------- // Usage: n_base.of_getbase32decode ( string as_code ) //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== String ls_msg If IsNull(as_code) Or Len(Trim(as_code)) = 0 Then Return "" End If ls_msg = GetBase32Decode(as_code) Return ls_msg end function public function string of_getbase64decode (string as_code);//==================================================================== // Function: n_base.of_getbase64decode() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // value string as_code //-------------------------------------------------------------------- // Returns: string //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2022/05/29 //-------------------------------------------------------------------- // Usage: n_base.of_getbase64decode ( string as_code ) //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== String ls_msg If IsNull(as_code) Or Len(Trim(as_code)) = 0 Then Return "" End If ls_msg = GetBase64Decode(as_code) Return ls_msg end function on n_base.create call super::create TriggerEvent( this, "constructor" ) end on on n_base.destroy TriggerEvent( this, "destructor" ) call super::destroy end on |
w_main from window
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
forward global type w_main from window end type type st_2 from statictext within w_main end type type st_1 from statictext within w_main end type type cb_base64decode from commandbutton within w_main end type type cb_base64encode from commandbutton within w_main end type type cb_base32decode from commandbutton within w_main end type type cb_base32encode from commandbutton within w_main end type type mle_output from multilineedit within w_main end type type mle_input from multilineedit within w_main end type end forward global type w_main from window integer width = 2377 integer height = 1260 boolean titlebar = true string title = "Base Encoding" boolean controlmenu = true boolean minbox = true boolean maxbox = true boolean resizable = true long backcolor = 67108864 string icon = "AppIcon!" boolean center = true st_2 st_2 st_1 st_1 cb_base64decode cb_base64decode cb_base64encode cb_base64encode cb_base32decode cb_base32decode cb_base32encode cb_base32encode mle_output mle_output mle_input mle_input end type global w_main w_main on w_main.create this.st_2=create st_2 this.st_1=create st_1 this.cb_base64decode=create cb_base64decode this.cb_base64encode=create cb_base64encode this.cb_base32decode=create cb_base32decode this.cb_base32encode=create cb_base32encode this.mle_output=create mle_output this.mle_input=create mle_input this.Control[]={this.st_2,& this.st_1,& this.cb_base64decode,& this.cb_base64encode,& this.cb_base32decode,& this.cb_base32encode,& this.mle_output,& this.mle_input} end on on w_main.destroy destroy(this.st_2) destroy(this.st_1) destroy(this.cb_base64decode) destroy(this.cb_base64encode) destroy(this.cb_base32decode) destroy(this.cb_base32encode) destroy(this.mle_output) destroy(this.mle_input) end on type st_2 from statictext within w_main integer x = 96 integer y = 612 integer width = 402 integer height = 64 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 long backcolor = 67108864 string text = "Output:" boolean focusrectangle = false end type type st_1 from statictext within w_main integer x = 87 integer y = 60 integer width = 402 integer height = 56 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 long backcolor = 67108864 string text = "Input:" boolean focusrectangle = false end type type cb_base64decode from commandbutton within w_main integer x = 1824 integer y = 820 integer width = 448 integer height = 112 integer taborder = 30 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Base64 Decode" end type event clicked;String ls_input, ls_output n_base ln_base mle_output.text = "" ls_input = mle_input.text ls_output = ln_base.of_getbase64decode(ls_input) mle_output.text = ls_output end event type cb_base64encode from commandbutton within w_main integer x = 1824 integer y = 684 integer width = 448 integer height = 112 integer taborder = 20 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Base64 Encode" end type event clicked;String ls_input, ls_output n_base ln_base mle_output.text = "" ls_input = mle_input.text ls_output = ln_base.of_getbase64encode(ls_input) mle_output.text = ls_output end event type cb_base32decode from commandbutton within w_main integer x = 1824 integer y = 264 integer width = 448 integer height = 112 integer taborder = 20 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Base32 Decode" end type event clicked;String ls_input, ls_output n_base ln_base mle_output.text = "" ls_input = mle_input.text ls_output = ln_base.of_getbase32decode(ls_input) mle_output.text = ls_output end event type cb_base32encode from commandbutton within w_main integer x = 1824 integer y = 136 integer width = 448 integer height = 112 integer taborder = 10 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Base32 Encode" end type event clicked;String ls_input, ls_output n_base ln_base mle_output.text = "" ls_input = mle_input.text ls_output = ln_base.of_getbase32encode(ls_input) mle_output.text = ls_output end event type mle_output from multilineedit within w_main integer x = 78 integer y = 684 integer width = 1678 integer height = 400 integer taborder = 20 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 borderstyle borderstyle = stylelowered! end type type mle_input from multilineedit within w_main integer x = 78 integer y = 136 integer width = 1678 integer height = 400 integer taborder = 10 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 borderstyle borderstyle = stylelowered! end type |
Find Projects On Github click here
Good Luck!
Hello
because google on May 31 will not allow less secure applications
An example with both SMTP and POP3 would be very good, how to send and receive emails with the new Google authentication protocols
Thank you so much
ok. I’ll try. I will update it soonest.
you can see this section of topwiz earlier versions. I have backups.
https://siteoffline.pblib.com/topwizprogramming/freecode.html
or https://www.brucearmstrong.org/2014/01/faq-how-can-i-send-smtp-from.html
Hello
Thanks a lot!!
Regarding the examples in TopWizard and Bruce, I couldn’t get the version on pbnismtp_vs2019 to work
If it works having enabled allow less secure applications
what will be deleted by Google
kenapa ini tidak jalan di powerbluider v 7.0
you check again from pb9 and earlier you have to remove ansi
Function String GetBase32Encode(String msg) Library “BaseEncoding.dll” Alias For “GetBase32Encode;Ansi”
Function String GetBase32Decode(String coded) Library “BaseEncoding.dll” Alias For “GetBase32Decode;Ansi”
Function String GetBase64Encode(String msg) Library “BaseEncoding.dll” Alias For “GetBase64Encode;Ansi”
Function String GetBase64Decode(String coded) Library “BaseEncoding.dll” Alias For “GetBase64Decode;Ansi”
sya melakukanya seperti ini :
–of_base64 —
String ls_result, msg
msg = ‘testbase64’
ls_result = Getbase64encode(msg)
uf_pressok(ls_result)
Return ls_result
Local External Functions
Function String GetBase64Encode(String as_msg) Library “BaseEncoding.dll” Alias For “GetBase64Encode”
base64 ref:
https://pblib.com/knowledge-base/powerbuilder-base64-encode-decode-with-key/
https://pblib.com/knowledge-base/powerbuilder-base64-encode-decode-a-string/
https://pblib.com/knowledge-base/powerbuilder-generate-base64-without-api/
with the link above. when accessing the .dll library file there is no response. is there something special for powerbluider v 7.0 to be able to call the .dll library. thanks
trimakasih. ini sudah jalan. tetapi type : base64 SecretKey . cuma sedikit , penyesuaian