LogoAntiRaid

@antiraid/datamgmt

API reference for @antiraid/datamgmt

@antiraid/datamgmt

Types

TarArchive

Raw Type
type TarArchive = {
	--- Takes out an entry from the tar archive by file name returning nil if not found
	takefile: (self: TarArchive, name: string) -> blob.Blob?,

	--- Adds an entry to the tar archive with the given file name and contents
	addfile: (self: TarArchive, name: string, contents: blob.BlobTaker) -> nil,

	--- Returns the names of all entries in the tar archive
	entries: (self: TarArchive) -> {string},

	--- Converts the tar archive to a Blob
	---
	--- This will destroy the tar archive (hence making it unusable for future Luau operations) 
	--- and return a Blob containing the tar archive data
	toblob: (self: TarArchive) -> blob.Blob
}
PropTypeDescription
takefile
(self, name: string) -> blob.Blob?
Takes out an entry from the tar archive by file name returning nil if not found
addfile
(self, name: string, contents: blob.BlobTaker) -> nil
Adds an entry to the tar archive with the given file name and contents
entries
(self) -> {string}
Returns the names of all entries in the tar archive
toblob
(self) -> blob.Blob
Converts the tar archive to a BlobThis will destroy the tar archive (hence making it unusable for future Luau operations)and return a Blob containing the tar archive data

Functions

newblob

Creates a new Blob from the given data

Function Signature
--- Creates a new Blob from the given data
function newblob(data: blob.BlobTaker) -> blob.Blob end

Arguments

data

blob.BlobTaker

Returns

ret1

blob.Blob

base64encode

Encodes a Blob to a base64 string

Function Signature
--- Encodes a Blob to a base64 string
function base64encode(data: blob.BlobTaker) -> string end

Arguments

data

blob.BlobTaker

Returns

ret1

string

base64decode

Decodes a base64 string to a Blob

Function Signature
--- Decodes a base64 string to a Blob
function base64decode(str: string) -> blob.Blob end

Arguments

str

string

Returns

ret1

blob.Blob

TarArchive

Creates a new TarArchive with an optional initial data Blob to load the initial TarArchive's contents from

Function Signature
--- Creates a new TarArchive with an optional initial data Blob to load the initial TarArchive's contents from
function TarArchive(buf: blob.BlobTaker?) -> TarArchive end

Arguments

buf

This field is optional and may not be specified

blob.BlobTaker?

Returns

ret1

TarArchive

aes256encrypt

Encrypts the Blob using AES256 encryption (Argon2id for key derivation)

Format: ``<salt><nonce><ciphertext>``

Function Signature
--- Encrypts the Blob using AES256 encryption (Argon2id for key derivation)
--- Format: \`\`<salt><nonce><ciphertext>\`\`
function aes256encrypt(data: blob.BlobTaker, key: string) -> blob.Blob end

Arguments

data

blob.BlobTaker

key

string

Returns

ret1

blob.Blob

aes256decrypt

Decrypts the Blob using AES256 decryption (Argon2id for key derivation)

Format: ``<salt><nonce><ciphertext>``

Function Signature
--- Decrypts the Blob using AES256 decryption (Argon2id for key derivation)
--- Format: \`\`<salt><nonce><ciphertext>\`\`
function aes256decrypt(data: blob.BlobTaker, key: string) -> blob.Blob end

Arguments

data

blob.BlobTaker

key

string

Returns

ret1

blob.Blob

aes256decryptcustom

Decrypts the Blob using AES256 decryption (Argon2id for key derivation)

Format: ``<salt><nonce><ciphertext>``

Function Signature
--- Decrypts the Blob using AES256 decryption (Argon2id for key derivation)
--- Format: \`\`<salt><nonce><ciphertext>\`\`
function aes256decryptcustom(salt: blob.BlobTaker, nonce: blob.BlobTaker, ciphertext: blob.BlobTaker, key: string) -> blob.Blob end

Arguments

salt

blob.BlobTaker

nonce

blob.BlobTaker

ciphertext

blob.BlobTaker

key

string

Returns

ret1

blob.Blob

Last updated on