SASC-NG
DVBSoftCAM

i_ecb.c File Reference

#include "idea.h"
#include "idea_lcl.h"

Go to the source code of this file.

Functions

void idea_ecb_encrypt (const unsigned char *in, unsigned char *out, IDEA_KEY_SCHEDULE *ks)

Function Documentation

void idea_ecb_encrypt ( const unsigned char *  in,
unsigned char *  out,
IDEA_KEY_SCHEDULE *  ks 
)

Definition at line 62 of file i_ecb.c.

References idea_encrypt(), l2n, and n2l.

Referenced by cIDEA::EcbEncrypt().

        {
        unsigned long l0,l1,d[2];

        n2l(in,l0); d[0]=l0;
        n2l(in,l1); d[1]=l1;
        idea_encrypt(d,ks);
        l0=d[0]; l2n(l0,out);
        l1=d[1]; l2n(l1,out);
        l0=l1=d[0]=d[1]=0;
        }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines