GetCryptoTransform

Gets a symmetric cryptography transform based on the key referred to by a symmetric key handle.

HRESULT
__stdcall GetCryptoTransform(
          __in PINFORMATIONCARD_CRYPTO_HANDLE hSymmetricCrypto,
          __in DWORD                   mode,
          __in PaddingMode             padding,
          __in DWORD                   feedbackSize,
          __in Direction               direction,
          __in DWORD                   cbIV,
          __in_bcount( cbIV ) BYTE*    pIV,
          __deref_out PINFORMATIONCARD_CRYPTO_HANDLE* pphTransform );

Parameters

Parameter Description

hSymmetricCrypto

Handle to the cryptography object associated with a previously released security token.

mode

One of the following cipher modes that are defined in Wincryp.h:

  • CRYPT_MODE_CBC: Cipher block chaining.

  • CRYPT_MODE_ECB: Electronic code book.

  • CRYPT_MODE_OFB: Output feedback mode.

  • CRYPT_MODE_CFB: Cipher feedback mode.

  • CRYPT_MODE_CTS: Cipher text stealing mode.

padding

Padding mode as described by the PaddingMode enumeration.

feedbacksize

Size of the feedback.

direction

Either encrypt or decrypt. Defines what the returned cryptography transform should do.

phTransform

A handle to the cryptography transform that can be used with TransformBlock and TransformFinalBlock. When you have finished, close this handle by using the CloseCryptoHandle function.

Property Value/Return Value

HRESULT

Requirements

Windows Vista

Header: Declared in infocard.h.

Library: Use infocardapi.lib.

See Also

Reference

TransformBlock
TransformFinalBlock

Concepts

HRESULTS Returned

Copyright © 2007 by Microsoft Corporation. All rights reserved.