PageRenderTime 924ms CodeModel.GetById 634ms app.highlight 2ms RepoModel.GetById 171ms app.codeStats 0ms

/flash-src/third-party/com/hurlant/crypto/symmetric/ISymmetricKey.as

http://github.com/gimite/web-socket-js
ActionScript | 35 lines | 12 code | 2 blank | 21 comment | 0 complexity | 653acfc614824311e0008caf89d6bb76 MD5 | raw file
 1/**
 2 * ISymmetricKey
 3 * 
 4 * An interface for symmetric encryption keys to implement.
 5 * Copyright (c) 2007 Henri Torgemane
 6 * 
 7 * See LICENSE.txt for full license information.
 8 */
 9package com.hurlant.crypto.symmetric
10{
11	import flash.utils.ByteArray;
12	
13	public interface ISymmetricKey
14	{
15		/**
16		 * Returns the block size used by this particular encryption algorithm
17		 */
18		function getBlockSize():uint;
19		/**
20		 * Encrypt one block of data in "block", starting at "index", of length "getBlockSize()"
21		 */
22		function encrypt(block:ByteArray, index:uint=0):void;
23		/**
24		 * Decrypt one block of data in "block", starting at "index", of length "getBlockSize()"
25		 */
26		function decrypt(block:ByteArray, index:uint=0):void;
27		/**
28		 * Attempts to destroy sensitive information from memory, such as encryption keys.
29		 * Note: This is not guaranteed to work given the Flash sandbox model.
30		 */
31		function dispose():void;
32		
33		function toString():String;
34	}
35}