Thanks for your inquiry. Please check the following VB code snippet and documentation link for encrypting PDF files. Hopefully, it will help you to accomplish the task.
'open document
Dim document As New Document("input.pdf")
' encrypt PDF
document.Encrypt("user", "owner", 0, CryptoAlgorithm.RC4x128)
' save updated PDF
document.Save("output.pdf")
Pleas feel free to contact us for any further assistance