@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
}
Prop | Type | Description |
---|---|---|
takefile | Takes out an entry from the tar archive by file name returning nil if not found | |
addfile | Adds an entry to the tar archive with the given file name and contents | |
entries | Returns the names of all entries in the tar archive | |
toblob | 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
Returns
ret1
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
Returns
ret1
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
Returns
ret1
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
Returns
ret1
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
key
Returns
ret1
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
key
Returns
ret1
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
nonce
ciphertext
key
Returns
ret1
Last updated on