4 * An interface for symmetric encryption keys to implement.
\r
5 * Copyright (c) 2007 Henri Torgemane
\r
7 * See LICENSE.txt for full license information.
\r
9 package com.hurlant.crypto.symmetric
\r
11 import flash.utils.ByteArray;
\r
13 public interface ISymmetricKey
\r
16 * Returns the block size used by this particular encryption algorithm
\r
18 function getBlockSize():uint;
\r
20 * Encrypt one block of data in "block", starting at "index", of length "getBlockSize()"
\r
22 function encrypt(block:ByteArray, index:uint=0):void;
\r
24 * Decrypt one block of data in "block", starting at "index", of length "getBlockSize()"
\r
26 function decrypt(block:ByteArray, index:uint=0):void;
\r
28 * Attempts to destroy sensitive information from memory, such as encryption keys.
\r
29 * Note: This is not guaranteed to work given the Flash sandbox model.
\r
31 function dispose():void;
\r
33 function toString():String;
\r