///|
pub(all) enum Encryption {
ARC4(Int, Int) // (bits, /R revision)
AESV2 // AES-128 CBC (PDF 1.5+)
AESV3(Bool) // AES-256, Bool indicates ISO mode (revision 6) vs revision 5
}///|
pub fn Encryption::r_and_keylength(self : Encryption) -> (Int, Int)pub struct PdfCryptPrimitives { ... }
pub fn PdfCryptPrimitives::new() -> PdfCryptPrimitivespub fn PdfCryptPrimitives::crypt(
self : PdfCryptPrimitives,
key : Array[Int],
data : @pdfio.MutableBytes
) -> @pdfio.MutableBytespub fn PdfCryptPrimitives::md5(
self : PdfCryptPrimitives,
data : @pdfio.MutableBytes
) -> @pdfio.MutableBytespub fn PdfCryptPrimitives::sha256(
self : PdfCryptPrimitives,
input : @pdfio.Input
) -> String raisepub fn PdfCryptPrimitives::sha384(
self : PdfCryptPrimitives,
input : @pdfio.Input
) -> String raisepub fn PdfCryptPrimitives::sha512(
self : PdfCryptPrimitives,
input : @pdfio.Input
) -> String raisepub fn PdfCryptPrimitives::aes_encrypt_data(
self : PdfCryptPrimitives,
nk : Int,
key : Array[Int],
data : @pdfio.MutableBytes,
firstblock? : Array[Int]
) -> @pdfio.MutableBytespub fn PdfCryptPrimitives::aes_decrypt_data(
self : PdfCryptPrimitives,
nk : Int,
key : Array[Int],
data : @pdfio.MutableBytes,
remove_padding? : Bool
) -> @pdfio.MutableBytespub fn PdfCryptPrimitives::find_hash(
self : PdfCryptPrimitives,
crypt_type : Encryption,
obj : Int,
gen : Int,
key : Array[Int],
keylength : Int
) -> Array[Int]pub fn PdfCryptPrimitives::decrypt_stream_data(
self : PdfCryptPrimitives,
crypt_type : Encryption,
encrypt : Bool,
file_encryption_key : String?,
obj : Int,
gen : Int,
key : Array[Int],
keylength : Int,
r : Int,
data : @pdfio.MutableBytes
) -> @pdfio.MutableBytes raisepub(all) enum Encryption {
ARC4(Int, Int)
AESV2
AESV3(Bool)
}impl Debug for Encryptionpub struct PdfCryptPrimitives {
unit : Unit
}fn PdfCryptPrimitives::aes_decrypt_data(_self : PdfCryptPrimitives, nk : Int, key : Array[Int], data : Array[Byte], remove_padding? : Bool) -> Array[Byte]fn PdfCryptPrimitives::aes_decrypt_data_ecb(_self : PdfCryptPrimitives, nk : Int, key : Array[Int], data : Array[Byte], remove_padding? : Bool) -> Array[Byte]fn PdfCryptPrimitives::aes_encrypt_data(_self : PdfCryptPrimitives, nk : Int, key : Array[Int], data : Array[Byte], firstblock? : Array[Int]) -> Array[Byte]fn PdfCryptPrimitives::aes_encrypt_data_ecb(_self : PdfCryptPrimitives, nk : Int, key : Array[Int], data : Array[Byte]) -> Array[Byte]fn PdfCryptPrimitives::crypt(_self : PdfCryptPrimitives, key : Array[Int], data : Array[Byte]) -> Array[Byte]fn PdfCryptPrimitives::decrypt_stream_data(self : PdfCryptPrimitives, crypt_type : Encryption, encrypt : Bool, file_encryption_key : String?, obj : Int, gen : Int, key : Array[Int], keylength : Int, r : Int, data : Array[Byte]) -> Array[Byte] raisefn PdfCryptPrimitives::find_hash(self : PdfCryptPrimitives, crypt_type : Encryption, obj : Int, gen : Int, key : Array[Int], keylength : Int) -> Array[Int]Dependencies