module Pdfcryptprimitives:sig..end
Generic encryption primitives for ARC4, AES and the SHA family of digests
val crypt : int array -> Pdfio.bytes -> Pdfio.bytesARC4 encryption (40 bit and 128 bit) given a key and some data
val aes_decrypt_data : ?remove_padding:bool -> int -> int array -> Pdfio.bytes -> Pdfio.bytesaes_decrypt_data nk key data decrypts AES data for the given key length,
key, and data. If remove_padding is true (which it is by default), padding
wil be removed from the output
val aes_decrypt_data_ecb : ?remove_padding:bool -> int -> int array -> Pdfio.bytes -> Pdfio.bytesAs aes_decrypt_data above, but in ECB instead of CBC mode
val aes_encrypt_data : ?firstblock:int array -> int -> int array -> Pdfio.bytes -> Pdfio.bytesaes_encrypt_data nk key data encryptes with AES, given a key length, key
and data. The first block (by default a random one) can be overridden by
specifying firstblock, an array of length 16.
val aes_encrypt_data_ecb : int -> int array -> Pdfio.bytes -> Pdfio.bytesAs aes_encrypt_data, but in ECB instead of CBC mode
val sha256 : Pdfio.input -> stringSHA256 digest
val sha384 : Pdfio.input -> stringSHA344 digest
val sha512 : Pdfio.input -> stringSHA512 digest