@girs/glib-2.0 2.80.2-4.0.0-beta.10 → 2.80.3-4.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/glib-2.0.d.ts +12 -65
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for GLib-2.0, generated from library version 2.80.
|
|
8
|
+
GJS TypeScript type definitions for GLib-2.0, generated from library version 2.80.3 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v4.0.0-beta.11.
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
## Install
|
package/glib-2.0.d.ts
CHANGED
|
@@ -8839,6 +8839,14 @@ export namespace GLib {
|
|
|
8839
8839
|
* @param prgname the name of the program.
|
|
8840
8840
|
*/
|
|
8841
8841
|
function set_prgname(prgname: string): void;
|
|
8842
|
+
/**
|
|
8843
|
+
* If g_get_prgname() is not set, this is the same as setting
|
|
8844
|
+
* the name via g_set_prgname() and %TRUE is returned. Otherwise,
|
|
8845
|
+
* does nothing and returns %FALSE. This is thread-safe.
|
|
8846
|
+
* @param prgname the name of the program.
|
|
8847
|
+
* @returns whether g_prgname was initialized by the call.
|
|
8848
|
+
*/
|
|
8849
|
+
function set_prgname_once(prgname: string): boolean;
|
|
8842
8850
|
/**
|
|
8843
8851
|
* Sets an environment variable. On UNIX, both the variable's name and
|
|
8844
8852
|
* value can be arbitrary byte strings, except that the variable's name
|
|
@@ -17044,85 +17052,24 @@ export namespace GLib {
|
|
|
17044
17052
|
steal(): void;
|
|
17045
17053
|
}
|
|
17046
17054
|
|
|
17047
|
-
/**
|
|
17048
|
-
* HMACs should be used when producing a cookie or hash based on data
|
|
17049
|
-
* and a key. Simple mechanisms for using SHA1 and other algorithms to
|
|
17050
|
-
* digest a key and data together are vulnerable to various security
|
|
17051
|
-
* issues.
|
|
17052
|
-
* [HMAC](http://en.wikipedia.org/wiki/HMAC)
|
|
17053
|
-
* uses algorithms like SHA1 in a secure way to produce a digest of a
|
|
17054
|
-
* key and data.
|
|
17055
|
-
*
|
|
17056
|
-
* Both the key and data are arbitrary byte arrays of bytes or characters.
|
|
17057
|
-
*
|
|
17058
|
-
* Support for HMAC Digests has been added in GLib 2.30, and support for SHA-512
|
|
17059
|
-
* in GLib 2.42. Support for SHA-384 was added in GLib 2.52.
|
|
17060
|
-
*
|
|
17061
|
-
* To create a new `GHmac`, use [ctor`GLib`.Hmac.new]. To free a `GHmac`, use
|
|
17062
|
-
* [method`GLib`.Hmac.unref].
|
|
17063
|
-
*/
|
|
17064
17055
|
class Hmac {
|
|
17065
17056
|
static $gtype: GObject.GType<Hmac>;
|
|
17066
17057
|
|
|
17067
17058
|
// Constructors of GLib.Hmac
|
|
17068
17059
|
|
|
17069
|
-
constructor(digest_type: ChecksumType, key:
|
|
17060
|
+
constructor(digest_type: ChecksumType, key: number, key_len: number);
|
|
17070
17061
|
_init(...args: any[]): void;
|
|
17071
17062
|
|
|
17072
|
-
static ['new'](digest_type: ChecksumType, key:
|
|
17063
|
+
static ['new'](digest_type: ChecksumType, key: number, key_len: number): Hmac;
|
|
17073
17064
|
|
|
17074
17065
|
// Own methods of GLib.Hmac
|
|
17075
17066
|
|
|
17076
|
-
/**
|
|
17077
|
-
* Copies a #GHmac. If `hmac` has been closed, by calling
|
|
17078
|
-
* g_hmac_get_string() or g_hmac_get_digest(), the copied
|
|
17079
|
-
* HMAC will be closed as well.
|
|
17080
|
-
* @returns the copy of the passed #GHmac. Use g_hmac_unref() when finished using it.
|
|
17081
|
-
*/
|
|
17082
17067
|
copy(): Hmac;
|
|
17083
|
-
|
|
17084
|
-
* Gets the digest from `checksum` as a raw binary array and places it
|
|
17085
|
-
* into `buffer`. The size of the digest depends on the type of checksum.
|
|
17086
|
-
*
|
|
17087
|
-
* Once this function has been called, the #GHmac is closed and can
|
|
17088
|
-
* no longer be updated with g_checksum_update().
|
|
17089
|
-
* @param buffer output buffer
|
|
17090
|
-
*/
|
|
17091
|
-
get_digest(buffer: Uint8Array | string): void;
|
|
17092
|
-
/**
|
|
17093
|
-
* Gets the HMAC as a hexadecimal string.
|
|
17094
|
-
*
|
|
17095
|
-
* Once this function has been called the #GHmac can no longer be
|
|
17096
|
-
* updated with g_hmac_update().
|
|
17097
|
-
*
|
|
17098
|
-
* The hexadecimal characters will be lower case.
|
|
17099
|
-
* @returns the hexadecimal representation of the HMAC. The returned string is owned by the HMAC and should not be modified or freed.
|
|
17100
|
-
*/
|
|
17068
|
+
get_digest(buffer: number, digest_len: number): void;
|
|
17101
17069
|
get_string(): string;
|
|
17102
|
-
/**
|
|
17103
|
-
* Atomically increments the reference count of `hmac` by one.
|
|
17104
|
-
*
|
|
17105
|
-
* This function is MT-safe and may be called from any thread.
|
|
17106
|
-
* @returns the passed in #GHmac.
|
|
17107
|
-
*/
|
|
17108
17070
|
ref(): Hmac;
|
|
17109
|
-
/**
|
|
17110
|
-
* Atomically decrements the reference count of `hmac` by one.
|
|
17111
|
-
*
|
|
17112
|
-
* If the reference count drops to 0, all keys and values will be
|
|
17113
|
-
* destroyed, and all memory allocated by the hash table is released.
|
|
17114
|
-
* This function is MT-safe and may be called from any thread.
|
|
17115
|
-
* Frees the memory allocated for `hmac`.
|
|
17116
|
-
*/
|
|
17117
17071
|
unref(): void;
|
|
17118
|
-
|
|
17119
|
-
* Feeds `data` into an existing #GHmac.
|
|
17120
|
-
*
|
|
17121
|
-
* The HMAC must still be open, that is g_hmac_get_string() or
|
|
17122
|
-
* g_hmac_get_digest() must not have been called on `hmac`.
|
|
17123
|
-
* @param data buffer used to compute the checksum
|
|
17124
|
-
*/
|
|
17125
|
-
update(data: Uint8Array | string): void;
|
|
17072
|
+
update(data: number, length: number): void;
|
|
17126
17073
|
}
|
|
17127
17074
|
|
|
17128
17075
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/glib-2.0",
|
|
3
|
-
"version": "2.80.
|
|
4
|
-
"description": "GJS TypeScript type definitions for GLib-2.0, generated from library version 2.80.
|
|
3
|
+
"version": "2.80.3-4.0.0-beta.11",
|
|
4
|
+
"description": "GJS TypeScript type definitions for GLib-2.0, generated from library version 2.80.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "glib-2.0.js",
|
|
7
7
|
"main": "glib-2.0.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"test": "tsc --project tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@girs/gjs": "^4.0.0-beta.
|
|
35
|
-
"@girs/gobject-2.0": "^2.80.
|
|
34
|
+
"@girs/gjs": "^4.0.0-beta.11",
|
|
35
|
+
"@girs/gobject-2.0": "^2.80.3-4.0.0-beta.11"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"typescript": "*"
|