-
Notifications
You must be signed in to change notification settings - Fork 5
Cryptographic Accelerator
This peripheral provides cryptography functions (encryption, hash, and key generation) to be used.

To be crafted the Cryptographic Accelerator requires:
- 6 stone blocks
- 1 redstone
- 2 gold ingots

The wraped peripheral will be named crypto
This encodes the data string using base64.
This decodes the base64 string encoded using base64.
This generates a random string with a length of length
It may be used to generate keys for the AES encryption or hmacs.
This encrypts the data string using the AES-CBC algorithm.
The key must be 16, 24 or 32 bytes long and the iv must be 16 bytes long.
Both of them may be generated using the randomBytes method.
This decrypts the data string encrypted using the AES-CBC algorithm.
The specifications are the same as in the encryptAES method.
This generates a RSA keypair of size keySize.
This encrypts the data string using the RSA algorithm.
The publicKey must be generated using the generateRSAKeys method.
This decrypts the data string encrypted using the RSA algorithm.
The privateKey must be from the same keypair as the publicKey used to encrypt the data.
This computes the MD5 hash of the data string.
This computes the SHA-512 hash of the data string
This computes the HmacMD5 hash of the data string.
This computes the HmacSHA-512 hash of the data string