Qore Programming Language Reference Manual  1.0.8
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 
201 string toBase64(softint maxlinelen = -1);
202 
203 public:
205 
221 string toHex();
222 
223 public:
225 
249 string toMD5();
250 
251 public:
253 
275 string toSHA1();
276 
277 public:
279 
305 string toSHA224();
306 
307 public:
309 
335 string toSHA256();
336 
337 public:
339 
365 string toSHA384();
366 
367 public:
369 
395 string toSHA512();
396 
397 public:
399 
413 string toString(*string encoding);
414 
415 public:
417 
431 int typeCode();
432 
433 public:
435 
451 bool val();
452 };
453 }
bool val()
Returns False if the binary object is empty (size = 0), True if not.
bool sizep()
Returns True since binary objects can return a non-zero size.
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...
int find(data bin, softint byte_pos=0)
Retrieves the byte position of a sequence of bytes within a binary object.
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
bool empty()
Returns True if the binary object is empty (size = 0), False if not.
string toSHA256()
Returns the SHA-256 message digest (a variant of SHA-2) of the binary data as a hex string...
binary substr(softint start)
Returns a portion of the binary data starting from an integer offset.
string toSHA1()
Returns the SHA1 message digest of the binary data as a hex string.
string toMD5()
Returns the MD5 message digest of the binary data as a hex string.
binary binary()
Always returns an empty binary object (of zero length)
string toSHA512()
Returns the SHA-512 message digest (a variant of SHA-2) of the binary data as a hex string...
string toBase64(softint maxlinelen=-1)
Returns the base64-encoded representation of the binary object.
Methods in this pseudo-class can be executed on binary values.
Definition: Pseudo_QC_Binary.dox.h:6
int typeCode()
Returns Qore::NT_BINARY.
int size()
Returns the number of bytes in the binary object.
string toSHA384()
Returns the SHA-384 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...
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
string toSHA224()
Returns the SHA-224 message digest (a variant of SHA-2) of the binary data as a hex string...
list< binary > split(data sep)
Returns a list of binary objects representing each component of the binary object separated by the by...
string toString()
Returns the string representation of the value; the default is an empty string.