You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

pygcrypt

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pygcrypt - pypi Package Compare versions

Comparing version
1.0.0
to
1.0.1
+1
-1
PKG-INFO
Metadata-Version: 1.1
Name: pygcrypt
Version: 1.0.0
Version: 1.0.1
Summary: libgcrypt in Python

@@ -5,0 +5,0 @@ Home-page: https://framagit.org/okhin/pygcrypt/

Metadata-Version: 1.1
Name: pygcrypt
Version: 1.0.0
Version: 1.0.1
Summary: libgcrypt in Python

@@ -5,0 +5,0 @@ Home-page: https://framagit.org/okhin/pygcrypt/

@@ -13,3 +13,3 @@ #!/usr/bin/env python

"""
This class is used to contyrol and manage the gcrypt function.
This class is used to control and manage the gcrypt function.
No operation can be done if the context has not been created

@@ -99,8 +99,11 @@ and initialized.

raise errors.GcryptException(ffi.string(lib.gcry_strerror(error)).decode(), error)
error = lib.gcry_control(lib.GCRYCTL_INIT_SECMEM, ffi.cast("int", 46384), ffi.cast("int", 0)) # 16k of secmem shoudl be more than enough
error = lib.gcry_control(lib.GCRYCTL_INIT_SECMEM, ffi.cast("int", 16384 * 4), ffi.cast("int", 0))
if error != 0:
raise errors.GcryptException(ffi.string(lib.gcry_strerror(error)).decode(), error)
error = lib.gcry_control(lib.GCRYCTL_RESUME_SECMEM_WARN)
self.secmem = True
if error != 0:
raise errors.GcryptException(ffi.string(lib.gcry_strerror(error)).decode(), error)
else:
self.secmem = False

@@ -107,0 +110,0 @@ # And initialisation is now done

@@ -43,3 +43,6 @@ #!/usr/bin/env python

ctx_handle = ffi.new("gcry_mac_hd_t *")
if self.secure:
ctx_handle = ffi.new_allocator(alloc=lib.gcry_malloc_secure, free=lib.gcry_free)('gcry_mac_hd_t *')
else:
ctx_handle = ffi.new('gcry_mac_hd_t *')
error = ffi.cast("gcry_error_t", 0)

@@ -46,0 +49,0 @@ error = lib.gcry_mac_open(ctx_handle, self.algo, flags, ffi.NULL)

@@ -28,3 +28,3 @@ #!/usr/bin/env python

# https://packaging.python.org/en/latest/single_source_version.html
version='1.0.0',
version='1.0.1',

@@ -31,0 +31,0 @@ description='libgcrypt in Python',