CryptoSys PKI Pro Manual

Cipher.Pad(Byte[], CipherAlgorithm, Padding) Method

Pad byte array to correct length for ECB and CBC encryption.

Syntax

[C#]
public static byte[] Pad(
   byte[] input,
   CipherAlgorithm cipherAlg,
   Padding pad = Padding.Pkcs5 
)
[VB]
Public Shared Function Pad (
   input As Byte(),
   cipherAlg As CipherAlgorithm,
   Optional pad As Padding = Padding.Pkcs5 
) As Byte()

Parameters

input  Byte
Data to be padded
cipherAlg  CipherAlgorithm
Block cipher being used
pad  Padding  (Optional)
Padding method to use (default is PKCS#5/#7)

Return Value

Byte
Padded data in byte array

See Also

VB6/C equivalent: PAD_BytesBlock

[Contents] [Index]

[PREV: Cipher.KeyWrap Method...]   [Contents]   [Index]   
   [NEXT: Cipher.Pad(String, CipherAlgorithm, Padding) Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.