API Reference

type Unsigned_5 , type Algorithm_Phase , type Round_Offset , type Subround_Offset , type Masks , type Rotations , type Cast_256_Key , procedure New_Key , procedure Encrypt , procedure Decrypt

  
   type Unsigned_5 is mod 32;  
  
   Rounds : constant := 6;  
  
   type Algorithm_Phase is range 0 .. 1;  
  
   type Round_Offset is range 1 .. Rounds;  
  
   type Subround_Offset is range 0 .. 3;  
  
   type Masks is array (Algorithm_Phase, Round_Offset, Subround_Offset) of  
      Interfaces.Unsigned_32;  
  
   type Rotations is array (Algorithm_Phase, Round_Offset, Subround_Offset) of  
      Unsigned_5;  
  
   type Cast_256_Key is new Symmetric_Key_Variable_Length with  
      record  
         Mask : Masks;  
         Rotate : Rotations;  
      end record;  
  
   procedure New_Key (Key_Schedule : out Cast_256_Key;  
                      Key_Bits : in Key_Block_Variable_Length);  
  
   procedure Encrypt (Key    : Cast_256_Key;  
                      Input  : in Cipher_Block;  
                      Output : out Cipher_Block);  
  
   procedure Decrypt (Key    : Cast_256_Key;  
                      Input  : in Cipher_Block;  
                      Output : out Cipher_Block);  
  
end ASCL.Cryptography.Ciphers.Symmetric.Cast_256;