Discuss this help topic in SecureBlackbox Forum

TSBSymmetricCipherPadding

Declared in     


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


Defines possible padding of the data.

Declaration

[C#]
    public enum TSBSymmetricCipherPadding { cpNone = 0, cpPKCS5 = 1, cpANSIX923 = 2 };

[VB.NET]
    Enum TSBSymmetricCipherPadding
        cpNone = 0
        cpPKCS5 = 1
        cpANSIX923 = 2
    End Enum

[Pascal]
    TSBSymmetricCipherPadding = (cpNone, cpPKCS5);

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

[PHP]
    class TSBSymmetricCipherPadding extends TSBBaseEnum {
        const cpNone = 0;
        const cpPKCS5 = 1;
        const cpANSIX923 = 2;
    }

[Java]
    public enum TSBSymmetricCipherPadding { cpNone, cpPKCS5, cpANSIX923 }

Possible values:

Description

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

.NET:
  • Namespace: SBSymmetricCrypto
  • Assembly: SecureBlackbox
VCL:
  • Unit: SBSymmetricCrypto
Java:
  • Package: SecureBlackbox.Base.jar
C++:
  • sbsymmetriccrypto.h

Discuss this help topic in SecureBlackbox Forum