| Qore Programming Language Reference Manual 2.2.0

Loading...
Searching...
No Matches
Pseudo_QC_Binary.dox.h
1
3 namespace Qore {
5/***/
6 class <binary> : public <value> {
7
8 public:
10
22 bool empty();
23
24 public:
26
51 int find(data bin, softint byte_pos = 0);
52
53 public:
55
81 int rfind(data bin, softint byte_pos = -1);
82
83 public:
85
97 int size();
98
99 public:
101
110 bool sizep();
111
112 public:
114
130 list<binary> split(data sep);
131
132 public:
134
153 binary substr(softint start);
154
155 public:
157
177 binary substr(softint start, softint len);
178
179 public:
181
203 string toBase64(softint maxlinelen = -1);
204
205 public:
207
225 string toBase64Url(softint maxlinelen = -1);
226
227 public:
229
245 string toHex();
246
247 public:
249
273 string toMD5();
274
275 public:
277
299 string toSHA1();
300
301 public:
303
329 string toSHA224();
330
331 public:
333
359 string toSHA256();
360
361 public:
363
389 string toSHA384();
390
391 public:
393
419 string toSHA512();
420
421 public:
423
437 string toString(*string encoding);
438
439 public:
441
455 int typeCode();
456
457 public:
459
475 bool val();
476};
477}
<binary>
Methods in this pseudo-class can be executed on binary values.
Definition Pseudo_QC_Binary.dox.h:6
<binary>::toString
string toString(*string encoding)
Returns a string created from the binary data, taking an optional second argument giving the string e...
<binary>::typeCode
int typeCode()
Returns Qore::NT_BINARY.
<binary>::size
int size()
Returns the number of bytes in the binary object.
<binary>::toSHA1
string toSHA1()
Returns the SHA1 message digest of the binary data as a hex string.
<binary>::toSHA256
string toSHA256()
Returns the SHA-256 message digest (a variant of SHA-2) of the binary data as a hex string.
<binary>::toSHA224
string toSHA224()
Returns the SHA-224 message digest (a variant of SHA-2) of the binary data as a hex string.
<binary>::find
int find(data bin, softint byte_pos=0)
Retrieves the byte position of a sequence of bytes within a binary object.
<binary>::empty
bool empty()
Returns True if the binary object is empty (size = 0), False if not.
<binary>::substr
binary substr(softint start)
Returns a portion of the binary data starting from an integer offset.
<binary>::rfind
int rfind(data bin, softint byte_pos=-1)
Retrieves the byte position of a sequence of bytes within a binary object searching from the end of t...
<binary>::val
bool val()
Returns False if the binary object is empty (size = 0), True if not.
<binary>::toSHA384
string toSHA384()
Returns the SHA-384 message digest (a variant of SHA-2) of the binary data as a hex string.
<binary>::substr
binary substr(softint start, softint len)
Returns a portion of the binary data starting from an integer offset.
<binary>::sizep
bool sizep()
Returns True since binary objects can return a non-zero size.
<binary>::toMD5
string toMD5()
Returns the MD5 message digest of the binary data as a hex string.
<binary>::toBase64
string toBase64(softint maxlinelen=-1)
Returns the base64-encoded representation of the binary object.
<binary>::toSHA512
string toSHA512()
Returns the SHA-512 message digest (a variant of SHA-2) of the binary data as a hex string.
<binary>::toHex
string toHex()
returns a string of hexadecimal digits corresponding to the contents of the binary object; hex charac...
<binary>::toBase64Url
string toBase64Url(softint maxlinelen=-1)
Returns the base64-url-encoded representation of the binary object.
<binary>::split
list< binary > split(data sep)
Returns a list of binary objects representing each component of the binary object separated by the by...
<value>
Methods in this pseudo-class are available to be executed on any value type (even NOTHING); this is t...
Definition Pseudo_QC_All.dox.h:6
Qore::list
list< auto > list(...)
Returns a list of the arguments passed at the top level.
Qore::binary
binary binary()
Always returns an empty binary object (of zero length)
Qore
main Qore-language namespace
Definition Pseudo_QC_All.dox.h:3