Discuss this help topic in SecureBlackbox Forum


Declared in     

Filter: C#  VB.NET  Pascal  C++  PHP  Java  

Defines possible padding of the data.


    public enum TSBSymmetricCipherPadding { cpNone = 0, cpPKCS5 = 1, cpANSIX923 = 2 };

    Enum TSBSymmetricCipherPadding
        cpNone = 0
        cpPKCS5 = 1
        cpANSIX923 = 2
    End Enum

    TSBSymmetricCipherPadding = (cpNone, cpPKCS5);

    typedef uint8_t TSBSymmetricCipherPaddingRaw;
    typedef enum { _cpNone = 0, _cpPKCS5 = 1, _cpANSIX923 = 2 } TSBSymmetricCipherPadding;

    class TSBSymmetricCipherPadding extends TSBBaseEnum {
        const cpNone = 0;
        const cpPKCS5 = 1;
        const cpANSIX923 = 2;

    public enum TSBSymmetricCipherPadding { cpNone, cpPKCS5, cpANSIX923 }

Possible values:


Defines possible padding types.

Note: Original PKCS#5 padding is defined for 8 byte encryption blocks only. PKCS#7 generalizes the original definition by extending it to support any block size while leaving the padding method itself unchanged. Certain standards therefore refer to the described padding type as 'PKCS#7 padding'. This might be confusing because 'PKCS#5 padding' name is widely used to refer to the same kind of padding (thus de-facto extending the original PKCS#5 declaration beyond the 8 byte block size limitation).

We understand that it is not entirely correct, but we prefer to keep the PKCS#5 naming for backward compatibility with earlier versions of SecureBlackbox and to avoid confusion with other PKCS#7 types. So whenever you are required to support PKCS#7 symmetric cipher padding, use cpPKCS5 type.

Declared in

  • Namespace: SBSymmetricCrypto
  • Assembly: SecureBlackbox
  • Unit: SBSymmetricCrypto
  • Package: SecureBlackbox.Base.jar
  • sbsymmetriccrypto.h

Discuss this help topic in SecureBlackbox Forum