Lines Matching refs:transform

30 + * This context is designed for repositing a block cipher for transform
72 +#define xmlSecNssBlockCipherGetCtx( transform ) \
73 + ( ( xmlSecNssBlockCipherCtxPtr )( ( ( xmlSecByte* )( transform ) ) + sizeof( xmlSecTransfor…
77 + xmlSecTransformPtr transform
80 + if( xmlSecTransformCheckId( transform, xmlSecNssTransformDes3CbcId ) ) {
86 + if( xmlSecTransformCheckId( transform, xmlSecNssTransformAes128CbcId ) ||
87 + xmlSecTransformCheckId( transform, xmlSecNssTransformAes192CbcId ) ||
88 + xmlSecTransformCheckId( transform, xmlSecNssTransformAes256CbcId ) ) {
140 + * @transform: the pointer to transform object.
142 + * The transform specific initialization method.
148 + xmlSecTransformPtr transform
152 + xmlSecAssert2( xmlSecNssBlockCipherCheckId( transform ), -1 ) ;
153 + xmlSecAssert2( xmlSecTransformCheckSize( transform, xmlSecNssBlockCipherSize ), -1 ) ;
155 + context = xmlSecNssBlockCipherGetCtx( transform ) ;
158 + xmlSecErrorsSafeString( xmlSecTransformGetName( transform ) ) ,
165 + if( xmlSecNssBlockCipherFetchCtx( context , transform->id ) < 0 ) {
167 + xmlSecErrorsSafeString( xmlSecTransformGetName( transform ) ) ,
182 + * @transform: the pointer to transform object.
184 + * The transform specific destroy method.
188 + xmlSecTransformPtr transform
192 + xmlSecAssert( xmlSecNssBlockCipherCheckId( transform ) ) ;
193 + xmlSecAssert( xmlSecTransformCheckSize( transform, xmlSecNssBlockCipherSize ) ) ;
195 + context = xmlSecNssBlockCipherGetCtx( transform ) ;
198 + xmlSecErrorsSafeString( xmlSecTransformGetName( transform ) ) ,
221 + * @transform: the pointer to transform object.
224 + * Transform specific method to set transform's key requirements.
230 + xmlSecTransformPtr transform ,
236 + xmlSecAssert2( xmlSecNssBlockCipherCheckId( transform ), -1 ) ;
237 + xmlSecAssert2( xmlSecTransformCheckSize( transform, xmlSecNssBlockCipherSize ), -1 ) ;
239 + xmlSecAssert2( ( transform->operation == xmlSecTransformOperationEncrypt ) || ( transform->…
241 + context = xmlSecNssBlockCipherGetCtx( transform ) ;
244 + xmlSecErrorsSafeString( xmlSecTransformGetName( transform ) ) ,
254 + if( transform->operation == xmlSecTransformOperationEncrypt ) {
272 + * @transform: the pointer to transform object.
275 + * The transform specific method to set the key for use.
281 + xmlSecTransformPtr transform ,
290 + xmlSecAssert2( xmlSecNssBlockCipherCheckId( transform ), -1 ) ;
291 + xmlSecAssert2( xmlSecTransformCheckSize( transform, xmlSecNssBlockCipherSize ), -1 ) ;
293 + xmlSecAssert2( ( transform->operation == xmlSecTransformOperationEncrypt ) || ( transform->ope…
295 + context = xmlSecNssBlockCipherGetCtx( transform ) ;
298 + xmlSecErrorsSafeString( xmlSecTransformGetName( transform ) ) ,
510 + * Block cipher transform update
801 -#define xmlSecNssBlockCipherGetCtx(transform) \
802 - ((xmlSecNssBlockCipherCtxPtr)(((xmlSecByte*)(transform)) + sizeof(xmlSecTransform)))
804 -static int xmlSecNssBlockCipherInitialize (xmlSecTransformPtr transform);
805 -static void xmlSecNssBlockCipherFinalize (xmlSecTransformPtr transform);
806 -static int xmlSecNssBlockCipherSetKeyReq (xmlSecTransformPtr transform,
808 -static int xmlSecNssBlockCipherSetKey (xmlSecTransformPtr transform,
810 -static int xmlSecNssBlockCipherExecute (xmlSecTransformPtr transform,
813 -static int xmlSecNssBlockCipherCheckId (xmlSecTransformPtr transform);
818 -xmlSecNssBlockCipherCheckId(xmlSecTransformPtr transform) {
820 - if(xmlSecTransformCheckId(transform, xmlSecNssTransformDes3CbcId)) {
826 - if(xmlSecTransformCheckId(transform, xmlSecNssTransformAes128CbcId) ||
827 - xmlSecTransformCheckId(transform, xmlSecNssTransformAes192CbcId) ||
828 - xmlSecTransformCheckId(transform, xmlSecNssTransformAes256CbcId)) {
838 -xmlSecNssBlockCipherInitialize(xmlSecTransformPtr transform) {
841 - xmlSecAssert2(xmlSecNssBlockCipherCheckId(transform), -1);
842 - xmlSecAssert2(xmlSecTransformCheckSize(transform, xmlSecNssBlockCipherSize), -1);
844 - ctx = xmlSecNssBlockCipherGetCtx(transform);
850 - if(transform->id == xmlSecNssTransformDes3CbcId) {
858 - if(transform->id == xmlSecNssTransformAes128CbcId) {
862 - } else if(transform->id == xmlSecNssTransformAes192CbcId) {
866 - } else if(transform->id == xmlSecNssTransformAes256CbcId) {
875 - xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
888 -xmlSecNssBlockCipherFinalize(xmlSecTransformPtr transform) {
891 - xmlSecAssert(xmlSecNssBlockCipherCheckId(transform));
892 - xmlSecAssert(xmlSecTransformCheckSize(transform, xmlSecNssBlockCipherSize));
894 - ctx = xmlSecNssBlockCipherGetCtx(transform);
905 -xmlSecNssBlockCipherSetKeyReq(xmlSecTransformPtr transform, xmlSecKeyReqPtr keyReq) {
908 - xmlSecAssert2(xmlSecNssBlockCipherCheckId(transform), -1);
909 - xmlSecAssert2((transform->operation == xmlSecTransformOperationEncrypt) || (transform->operati…
910 - xmlSecAssert2(xmlSecTransformCheckSize(transform, xmlSecNssBlockCipherSize), -1);
913 - ctx = xmlSecNssBlockCipherGetCtx(transform);
951 - if(transform->operation == xmlSecTransformOperationEncrypt) {
961 -xmlSecNssBlockCipherSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key) {
966 + * @transform: the pointer to transform object.
968 + * @transformCtx: the pointer to transform context object.
975 + xmlSecTransformPtr transform ,
986 xmlSecAssert2(xmlSecNssBlockCipherCheckId(transform), -1);
987 - xmlSecAssert2((transform->operation == xmlSecTransformOperationEncrypt) || (transform->operati…
988 xmlSecAssert2(xmlSecTransformCheckSize(transform, xmlSecNssBlockCipherSize), -1);
991 - ctx = xmlSecNssBlockCipherGetCtx(transform);
1003 + xmlSecAssert2( ( transform->operation == xmlSecTransformOperationEncrypt ) || ( transform->ope…
1007 + context = xmlSecNssBlockCipherGetCtx( transform ) ;
1010 xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
1029 -xmlSecNssBlockCipherExecute(xmlSecTransformPtr transform, int last, xmlSecTransformCtxPtr transfor…
1034 - xmlSecAssert2(xmlSecNssBlockCipherCheckId(transform), -1);
1035 - xmlSecAssert2((transform->operation == xmlSecTransformOperationEncrypt) || (transform->operati…
1036 - xmlSecAssert2(xmlSecTransformCheckSize(transform, xmlSecNssBlockCipherSize), -1);
1039 - in = &(transform->inBuf);
1040 - out = &(transform->outBuf);
1042 - ctx = xmlSecNssBlockCipherGetCtx(transform);
1044 + inBuf = &( transform->inBuf ) ;
1045 + outBuf = &( transform->outBuf ) ;
1047 if(transform->status == xmlSecTransformStatusNone) {
1048 transform->status = xmlSecTransformStatusWorking;
1051 + operation = ( transform->operation == xmlSecTransformOperationEncrypt ) ? 1 : 0 ;
1052 + cipherName = xmlSecTransformGetName( transform ) ;
1054 if(transform->status == xmlSecTransformStatusWorking) {
1057 - (transform->operation == xmlSecTransformOperationEncrypt) ? 1 : 0,
1058 - xmlSecTransformGetName(transform), transformCtx);
1064 xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
1075 xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
1079 "not enough data to initialize transform");
1085 - (transform->operation == xmlSecTransformOperationEncrypt) ? 1 : 0,
1086 - xmlSecTransformGetName(transform), transformCtx);
1092 xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
1103 - (transform->operation == xmlSecTransformOperationEncrypt) ? 1 : 0,
1104 - xmlSecTransformGetName(transform), transformCtx);
1109 xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
1116 transform->status = xmlSecTransformStatusFinished;
1118 } else if(transform->status == xmlSecTransformStatusFinished) {
1121 - } else if(transform->status == xmlSecTransformStatusNone) {
1126 + xmlSecErrorsSafeString( xmlSecTransformGetName( transform ) ) ,
1129 + "status=%d", transform->status ) ;
1134 xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),