semvec/pypi-packages huggingface dataset:
PyRsa 1.0.3
python enables rsa encryption

### 面向正方教务使用的 rsa 加密方法的 Python 实现

## 基本使用

### 安装

```
pip install PyRsa
```

### 基本使用

使用 RsaKey 模块

由于本模块是面向正方教务的加密，因此 modulus 长度应为 172；如果单纯是加密着玩的话，那么 modulus 与 pre_psw 两个参数的长度则有所限制，大概就是

```
modulus = int(psw / 3) + 15 + psw
```

嘛，谁会这么无聊干这事儿呢

```
>>> from PyRsa.pyrsa import RsaKey
>>> from PyRsa.pyb64 import Base64
>>> modulus = "AJftLhHzsQPu1LwCgOR41hRKn4tbaD/ehyZKiBWDYCpaualtMyJIT0SzBl07O2NwjxI8uwr82SMvEW9iiSEoBylHOWNnEzyOYwXb29xMo+D4LTVqMX7NkAliIqH+wOSA1g0DVxmcQWCtGVI4vDUnGIN8tYPlxc9NIXN5zO0HwqKn"
>>> exponent = 'AQAB'
>>> rsakey.set_public(Base64().b64tohex(modulus), Base64().b64tohex(exponent))
>>> psw = '1234567890'
>>> en_psw = Base64().hex2b64(rsakey.encrypt(pre_psw))
```
lambda-packaging 0.3.0
Pulumi-based python solution for Packaging an AWS Lambda and its Layer.

# Overview

Pulumi-based python solution for Packaging an AWS Lambda and its Layer.

## Directory Structure
```
├── README.md
├── example
│   ├── Pulumi.dev.yaml
│   ├── Pulumi.yaml
│   ├── __main__.py
│   └── requirements.txt
├── lambda_packaging
│   ├── __init__.py
│   ├── components.py
│   ├── pip_requirements.py
│   ├── utils.py
│   └── zip_package.py
├── requirements.txt
├── setup.cfg
├── setup.py
└── tests
```

## Installation
```
$ pip install lambda-packaging
```
## Quick Start

### LambdaPackaging
Creates a zip package of project files and install dependencies from requirements.txt.

Use "dockerize=True" to pip install requirements using lambda environment docker image.

Use "layer=True" to package dependencies and code seperately.

Example: 

```python

...

...


lambda_package = LambdaPackage(
    name='example-test',
    no_deploy=['pulumi', 'pulumi_aws', 'pulumi_docker'],
    exclude=['__main__.py']
)




# Create Lambda function
function = lambda_.Function(
    resource_name='function',
    role=role.arn,
    runtime='python3.6',
    description=f'Lambda function running the f`{pulumi.get_project()}` ({pulumi.get_stack()}) project',
    handler='handler.lambda_handler',
    code=lambda_package.package_archive
)

# path of package archive and dependencies package
# containing installed requirements
pulumi.export("package_archive_path", lambda_package.package_archive)
pulumi.export("layer_archive_path", lambda_package.layer_archive_path)

```

### LambdaLayerPackaging
Creates a lambda layer. By default it zips all the project files.

Use "include" and "exclude" parameter to only add specific folders/files.

```python
from pulumi import log
from lambda_packaging import LambdaLayerPackaging


lambda_layer = LambdaLayerPackaging('example-layer-test',
                                    runtimes=['python3.6'],
                                    layer_name="example-layer",
                                    description="Example Layer for Testing",
                                    exclude=[".gitignore", '__main__.py'])

pulumi.export('layer_arn', lambda_layer.arn)

```

```bash
$ pulumi up
```