• Home
  • Raw
  • Download

Lines Matching refs:signature_info

119     *signature_info;  in AcquireSignatureInfo()  local
124 signature_info=(SignatureInfo *) AcquireMagickMemory(sizeof(*signature_info)); in AcquireSignatureInfo()
125 if (signature_info == (SignatureInfo *) NULL) in AcquireSignatureInfo()
127 (void) ResetMagickMemory(signature_info,0,sizeof(*signature_info)); in AcquireSignatureInfo()
128 signature_info->digestsize=SignatureDigestsize; in AcquireSignatureInfo()
129 signature_info->blocksize=SignatureBlocksize; in AcquireSignatureInfo()
130 signature_info->digest=AcquireStringInfo(SignatureDigestsize); in AcquireSignatureInfo()
131 signature_info->message=AcquireStringInfo(SignatureBlocksize); in AcquireSignatureInfo()
132 signature_info->accumulator=(unsigned int *) AcquireQuantumMemory( in AcquireSignatureInfo()
133 SignatureBlocksize,sizeof(*signature_info->accumulator)); in AcquireSignatureInfo()
134 if (signature_info->accumulator == (unsigned int *) NULL) in AcquireSignatureInfo()
137 signature_info->lsb_first=(int) (*(char *) &lsb_first) == 1 ? MagickTrue : in AcquireSignatureInfo()
139 signature_info->timestamp=(ssize_t) time(0); in AcquireSignatureInfo()
140 signature_info->signature=MagickCoreSignature; in AcquireSignatureInfo()
141 InitializeSignature(signature_info); in AcquireSignatureInfo()
142 return(signature_info); in AcquireSignatureInfo()
168 MagickPrivate SignatureInfo *DestroySignatureInfo(SignatureInfo *signature_info) in DestroySignatureInfo() argument
171 assert(signature_info != (SignatureInfo *) NULL); in DestroySignatureInfo()
172 assert(signature_info->signature == MagickCoreSignature); in DestroySignatureInfo()
173 if (signature_info->accumulator != (unsigned int *) NULL) in DestroySignatureInfo()
174 signature_info->accumulator=(unsigned int *) RelinquishMagickMemory( in DestroySignatureInfo()
175 signature_info->accumulator); in DestroySignatureInfo()
176 if (signature_info->message != (StringInfo *) NULL) in DestroySignatureInfo()
177 signature_info->message=DestroyStringInfo(signature_info->message); in DestroySignatureInfo()
178 if (signature_info->digest != (StringInfo *) NULL) in DestroySignatureInfo()
179 signature_info->digest=DestroyStringInfo(signature_info->digest); in DestroySignatureInfo()
180 signature_info->signature=(~MagickCoreSignature); in DestroySignatureInfo()
181 signature_info=(SignatureInfo *) RelinquishMagickMemory(signature_info); in DestroySignatureInfo()
182 return(signature_info); in DestroySignatureInfo()
207 MagickPrivate void FinalizeSignature(SignatureInfo *signature_info) in FinalizeSignature() argument
230 assert(signature_info != (SignatureInfo *) NULL); in FinalizeSignature()
231 assert(signature_info->signature == MagickCoreSignature); in FinalizeSignature()
232 low_order=signature_info->low_order; in FinalizeSignature()
233 high_order=signature_info->high_order; in FinalizeSignature()
235 datum=GetStringInfoDatum(signature_info->message); in FinalizeSignature()
237 if (count <= (unsigned int) (GetStringInfoLength(signature_info->message)-8)) in FinalizeSignature()
239 signature_info->message)-8-count); in FinalizeSignature()
243 signature_info->message)-count); in FinalizeSignature()
244 TransformSignature(signature_info); in FinalizeSignature()
246 signature_info->message)-8); in FinalizeSignature()
256 TransformSignature(signature_info); in FinalizeSignature()
257 p=signature_info->accumulator; in FinalizeSignature()
258 q=GetStringInfoDatum(signature_info->digest); in FinalizeSignature()
292 const SignatureInfo *signature_info) in GetSignatureBlocksize() argument
295 assert(signature_info != (SignatureInfo *) NULL); in GetSignatureBlocksize()
296 assert(signature_info->signature == MagickCoreSignature); in GetSignatureBlocksize()
297 return(signature_info->blocksize); in GetSignatureBlocksize()
323 const SignatureInfo *signature_info) in GetSignatureDigest() argument
326 assert(signature_info != (SignatureInfo *) NULL); in GetSignatureDigest()
327 assert(signature_info->signature == MagickCoreSignature); in GetSignatureDigest()
328 return(signature_info->digest); in GetSignatureDigest()
354 const SignatureInfo *signature_info) in GetSignatureDigestsize() argument
357 assert(signature_info != (SignatureInfo *) NULL); in GetSignatureDigestsize()
358 assert(signature_info->signature == MagickCoreSignature); in GetSignatureDigestsize()
359 return(signature_info->digestsize); in GetSignatureDigestsize()
384 MagickPrivate void InitializeSignature(SignatureInfo *signature_info) in InitializeSignature() argument
387 assert(signature_info != (SignatureInfo *) NULL); in InitializeSignature()
388 assert(signature_info->signature == MagickCoreSignature); in InitializeSignature()
389 signature_info->accumulator[0]=0x6a09e667U; in InitializeSignature()
390 signature_info->accumulator[1]=0xbb67ae85U; in InitializeSignature()
391 signature_info->accumulator[2]=0x3c6ef372U; in InitializeSignature()
392 signature_info->accumulator[3]=0xa54ff53aU; in InitializeSignature()
393 signature_info->accumulator[4]=0x510e527fU; in InitializeSignature()
394 signature_info->accumulator[5]=0x9b05688cU; in InitializeSignature()
395 signature_info->accumulator[6]=0x1f83d9abU; in InitializeSignature()
396 signature_info->accumulator[7]=0x5be0cd19U; in InitializeSignature()
397 signature_info->low_order=0; in InitializeSignature()
398 signature_info->high_order=0; in InitializeSignature()
399 signature_info->offset=0; in InitializeSignature()
427 MagickPrivate void SetSignatureDigest(SignatureInfo *signature_info, in SetSignatureDigest() argument
433 assert(signature_info != (SignatureInfo *) NULL); in SetSignatureDigest()
434 assert(signature_info->signature == MagickCoreSignature); in SetSignatureDigest()
435 SetStringInfo(signature_info->digest,digest); in SetSignatureDigest()
481 *signature_info; in SignatureImage() local
499 signature_info=AcquireSignatureInfo(); in SignatureImage()
544 UpdateSignature(signature_info,signature); in SignatureImage()
547 FinalizeSignature(signature_info); in SignatureImage()
548 hex_signature=StringInfoToHexString(GetSignatureDigest(signature_info)); in SignatureImage()
556 signature_info=DestroySignatureInfo(signature_info); in SignatureImage()
603 static void TransformSignature(SignatureInfo *signature_info) in TransformSignature() argument
653 p=GetStringInfoDatum(signature_info->message); in TransformSignature()
654 if (signature_info->lsb_first == MagickFalse) in TransformSignature()
699 A=signature_info->accumulator[0]; in TransformSignature()
700 B=signature_info->accumulator[1]; in TransformSignature()
701 C=signature_info->accumulator[2]; in TransformSignature()
702 D=signature_info->accumulator[3]; in TransformSignature()
703 E=signature_info->accumulator[4]; in TransformSignature()
704 F=signature_info->accumulator[5]; in TransformSignature()
705 G=signature_info->accumulator[6]; in TransformSignature()
706 H=signature_info->accumulator[7]; in TransformSignature()
725 signature_info->accumulator[0]=Trunc32(signature_info->accumulator[0]+A); in TransformSignature()
726 signature_info->accumulator[1]=Trunc32(signature_info->accumulator[1]+B); in TransformSignature()
727 signature_info->accumulator[2]=Trunc32(signature_info->accumulator[2]+C); in TransformSignature()
728 signature_info->accumulator[3]=Trunc32(signature_info->accumulator[3]+D); in TransformSignature()
729 signature_info->accumulator[4]=Trunc32(signature_info->accumulator[4]+E); in TransformSignature()
730 signature_info->accumulator[5]=Trunc32(signature_info->accumulator[5]+F); in TransformSignature()
731 signature_info->accumulator[6]=Trunc32(signature_info->accumulator[6]+G); in TransformSignature()
732 signature_info->accumulator[7]=Trunc32(signature_info->accumulator[7]+H); in TransformSignature()
774 MagickPrivate void UpdateSignature(SignatureInfo *signature_info, in UpdateSignature() argument
792 assert(signature_info != (SignatureInfo *) NULL); in UpdateSignature()
793 assert(signature_info->signature == MagickCoreSignature); in UpdateSignature()
795 length=Trunc32((unsigned int) (signature_info->low_order+(n << 3))); in UpdateSignature()
796 if (length < signature_info->low_order) in UpdateSignature()
797 signature_info->high_order++; in UpdateSignature()
798 signature_info->low_order=length; in UpdateSignature()
799 signature_info->high_order+=(unsigned int) (n >> 29); in UpdateSignature()
801 if (signature_info->offset != 0) in UpdateSignature()
803 i=GetStringInfoLength(signature_info->message)-signature_info->offset; in UpdateSignature()
806 (void) CopyMagickMemory(GetStringInfoDatum(signature_info->message)+ in UpdateSignature()
807 signature_info->offset,p,i); in UpdateSignature()
810 signature_info->offset+=i; in UpdateSignature()
811 if (signature_info->offset != in UpdateSignature()
812 GetStringInfoLength(signature_info->message)) in UpdateSignature()
814 TransformSignature(signature_info); in UpdateSignature()
816 while (n >= GetStringInfoLength(signature_info->message)) in UpdateSignature()
818 SetStringInfoDatum(signature_info->message,p); in UpdateSignature()
819 p+=GetStringInfoLength(signature_info->message); in UpdateSignature()
820 n-=GetStringInfoLength(signature_info->message); in UpdateSignature()
821 TransformSignature(signature_info); in UpdateSignature()
823 (void) CopyMagickMemory(GetStringInfoDatum(signature_info->message),p,n); in UpdateSignature()
824 signature_info->offset=n; in UpdateSignature()