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